• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

correct the code

delta

Member
my userform
TextBox1 = 5
TextBox2 = 15
TextBox3= 10000
my code is below

Dim i As Integer
For i = TextBox1.Value To TextBox2.Value
cells(3, 3).Value = TextBox3.Value * 12
cells(4, 3).Value = cells(3, 3).Value * (1 + 6 / 100)
Next i

i need to calculate above code up to difference between TextBox1 To TextBox2 value in sheets1 in range "C3" to next 10 rows ( TextBox1 = 5 - TextBox2 = 15 )
pls give me correct code for your refrance attache excel file
 

Attachments

  • test.xlsm
    20.6 KB · Views: 5
sir
my range Set rng = [C5:C12] is not static range it always change and this range is difference between TextBox1 To TextBox2. if in current example my textbox1 value is 1 and textbox2 value is 20 than above code work till "C5:C12"actually my range is dynamic. so pl provide code for dynamic range
for more celerity i attach snapshot too
 

Attachments

  • Capture.JPG
    Capture.JPG
    46.4 KB · Views: 3
Next try
see attached
For the future:
25% of the solution is a clear question
25% of the solution is a good example
 

Attachments

  • delta(2).xlsm
    22.7 KB · Views: 3
sir Marc L i attache the image in explain in this image and also i attache the sample file
TextBox 1 value = 1
TextBox 2 value = 5
TextBox 3 value = 10000
 

Attachments

  • Capture.JPG
    Capture.JPG
    51.3 KB · Views: 6
  • delta.xlsm
    21.7 KB · Views: 2
Last edited:
Back
Top