Hi
I had a look in the forum but couldn't find a thread that would help (after trying some solutions in those threads)
An example of the cells I am trying to manipulate are below:
The Do loop I have written populates the cells, pulling the data in from other sheets. But I need it to change column I to 0 if column H is populated with TRUE and column J has a value greater than 1. The coding I have tried is as follows:
The code in red is what I have tried, and I have tried alternatives and nothing seems to be making the 50 change to 0. Does anyone have any ideas where I am going wrong?
Many thanks,
Jamie
I had a look in the forum but couldn't find a thread that would help (after trying some solutions in those threads)
An example of the cells I am trying to manipulate are below:
A | B | C | D | E | F | G | H | I | J | K | L |
680 | 39 | 45 | 33.75 | 10.283 | 10.283 | FALSE | 50 | 0 | 1.614 | -50 | |
681 | 42 | 45 | 39.375 | 12.187 | 12.187 | TRUE | 50 | 12 | 0.133 | 4.702 |
The Do loop I have written populates the cells, pulling the data in from other sheets. But I need it to change column I to 0 if column H is populated with TRUE and column J has a value greater than 1. The coding I have tried is as follows:
Rich (BB code):
rownum = 18
Do
rownum = rownum + 1
elstring = Cells(rownum, 4)
If elstring = "" Then Exit Do
el = Cells(rownum, 4)
bs = Cells(rownum, 5)
Kf = Cells(rownum, 6)
'Pick up the data and write to the target sheet
KFCheck = ReadKFCheck(el, bs)
Cells(rownum, 7) = KFCheck
PTFound = ReadPTFound(el, bs)
Cells(rownum, 8) = PTFound
punchThrough = ReadPunchThrough(el, bs)
Cells(rownum, 9) = punchThrough
NumPTAngles = ReadNumPTAngles(el, bs)
Cells(rownum, 10) = NumPTAngles \ 5#
If Cells(rownum, 8) = "TRUE" And Cells(rownum, 10) >= 1# Then
Cells(rownum, 9) = 0#
End If
BeamGainDepth = ReadBeamGainDepth(el, bs)
Cells(rownum, 11) = BeamGainDepth
PTMaxGain = ReadPTMaxGain(el, bs)
Cells(rownum, 12) = PTMaxGain
Loop
The code in red is what I have tried, and I have tried alternatives and nothing seems to be making the 50 change to 0. Does anyone have any ideas where I am going wrong?
Many thanks,
Jamie