CedricMattelaer
New Member
- Joined
- Jun 16, 2011
- Messages
- 37
Just a really easy question, but after a day spent on the internet without finding the solution I thought I might subscribe to this forum and ask it here.
I currently have this line of code:
For i = 1 To 272
For j = 1 To 13
If Worksheets("exercice").Cells(i, 1) = "1" Then
Worksheets("exercice").Cells(344 + i, 3 + j) = "=C288"
Next i
Next j
Problem is, if j goes up with 1, I also want the relative reference to "=C288" to become "=D288".
Is there a way to do this?
I could write, for example, =Cells(288, 3+j) but then only the value of the cell is copied, and I need the relation between both (ie instead of "1" in that cell, I need "=D288")
I hope I explained it ok and thanks for sharing your knowledge!
I currently have this line of code:
For i = 1 To 272
For j = 1 To 13
If Worksheets("exercice").Cells(i, 1) = "1" Then
Worksheets("exercice").Cells(344 + i, 3 + j) = "=C288"
Next i
Next j
Problem is, if j goes up with 1, I also want the relative reference to "=C288" to become "=D288".
Is there a way to do this?
I could write, for example, =Cells(288, 3+j) but then only the value of the cell is copied, and I need the relation between both (ie instead of "1" in that cell, I need "=D288")
I hope I explained it ok and thanks for sharing your knowledge!