Home |
Search |
Today's Posts |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Dim LastRow As Long
LastRow = 65536 If IsEmpty(Cells(LastRow, "A")) Then LastRow = Cells(LastRow, "A").End(xlUp).Row If LastRow = 1 And IsEmpty(Cells(LastRow, "A")) Then LastRow = 0 End If Returns the last row in a column with something in it. Returns zero if the entire column is empty "HelpEachOther" wrote: Hi, VBA experts: Can anyone inform me if VBA has a function that tells if a coumn in a worksheet is empty? I wrote the following code, but it does not work. I could write some code to check each row of the column, but I believe VBA must have a function to take care of this. Please help. Thanks. Cells(3, 6).Select Range(ActiveCell, ActiveCell.End(xlDown)).Select If Selection.Value = " " Then noData = True Esle Selection.Copy End If Thank you very much. KHW |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
EXCEL function;find string in entire column & return cell referenc | Excel Worksheet Functions | |||
How to SUM entire column, but only when adjacent cell is not empty | Excel Worksheet Functions | |||
Find Column heading and then Delete entire column | Excel Programming | |||
Is there a test to see if an entire row or column is empty? | Excel Programming | |||
Find the first empty column | Excel Programming |