Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Code won't fill to last row in table
Hello-
I have a code to fill all blanks in column F with an "X". There is data in Columns A:E down to row 2145, but the code only puts the X down to row 2135. Cell 2136 is the last filled cell in column F, this has something to do with it. I want the code to search column F based on the entire range of column E, in this case E2:E2145. Sub b() Dim lngLastRow As Long Application.ScreenUpdating = False For lngLastRow = Cells(Cells.Rows.Count, "F").End(xlUp).Row To 2 Step -1 If Cells(lngLastRow, "F") = "" Then Cells(lngLastRow, "F").Value = "X" End If Next lngLastRow Application.ScreenUpdating = True End Sub Please help if possible |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
VBA code to fill down | Excel Discussion (Misc queries) | |||
macro code for XML Fill | Excel Programming | |||
sub won't fill down via code | Excel Programming | |||
List Fill Code | Excel Programming | |||
VBA Code for a pivot table to open database and to reference table current page | Excel Programming |