I have a question regarding excel vba and the use of the "IF" function with the "For" cycle. I will try to be as clear as possible.
here is the code:
sub cicleFor()
For i= 1 to 2
Calculate
Range("E3").Select
Selection.Copy Sheets("Sheet2").Select Range("A2").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Sheets("Sheet1").Select
Range("C14").Select
Next
It is pretty simple! I take E3, copy paste into another cell (A2) for two times. I use calculate at the start because the number in E3 will change each time
What I would like to have is the following:
to use an "IF" function that, if A2 is full, goes to A3 and so on, for i = 1 to 100.
since I have used a for function, i want A2,A3,A4,...A100 to be filled with the result of E3 of the sheet1.
I am not an expert as you can see!
if you have any hint, I will be grateful!
Thank you!