floridagunner
Board Regular
- Joined
- Jul 20, 2007
- Messages
- 60
Hello all,
I'm using the following code to enter a formula into column B which references values in column T:
The problem is that when Excel gets to processing this section of the code it is taking it approximately 35 minutes to process for about 42,000 rows, which I think is abnormally long.
I want to know if there is a way I can speed this process up. Is there a data type declaration that I should be using? Is long perhaps the wrong data type to be using? Should I be using a different type of code alltogether?
Any help is appreciated.
I'm using the following code to enter a formula into column B which references values in column T:
Code:
'Populate Program name column with formulas now referencing values 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(T" & c & ",1)=""D"",IF(VALUE(MID(T" & c & ",6,2)) " & _
"<24,""Carbon Abatement"",""EE Reloaded""),""EEE"")"
Next c
The problem is that when Excel gets to processing this section of the code it is taking it approximately 35 minutes to process for about 42,000 rows, which I think is abnormally long.
I want to know if there is a way I can speed this process up. Is there a data type declaration that I should be using? Is long perhaps the wrong data type to be using? Should I be using a different type of code alltogether?
Any help is appreciated.