Hello all,

I wrote the following code to enter a formula in column B referenncing cells in column T:

Dim ab As Long, c As Long
ab = Cells(Rows.Count, "T").End(xlUp).Row
For c = 2 To ab
Range("B" & c).Formula = "=IF(LEFT(D2,1)=""D"",IF(VALUE(MID(D2,6,2))<24,""Carbon Abatement"",""EE Reloaded""),""EEE"")"
Next c
When the code is run it is creating 2 problems;

1. When it runs this code the code runs for several minutes at this stage and I'm not able to understand why. It does finally complete after several minutes have elapsed so I think there may be something wrong.

2. After the maro has run, all the cells in column B, are referencing Cell number T2 in column B instead of the adjacent cell in column T.


Any idea on what my coding error is?