Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
To find row is empty or not
Hi all,
I kindly request your help how to find a row is empty row. For example in my following code I have to give one more condition also like if rowcount = currow and rowcount is not empty // How I can give the condition Original code as follows LastRow = Range("G" & Rows.Count).End(xlUp).Row currow = ActiveCell.Row For RowCount = 1 To LastRow If RowCount = currow Then // I need to check row is empty or not If Range("A" & RowCount) = "" Or Range("A" & RowCount) = 0 Then Range("A" & RowCount) = Col_A Else Col_A = Range("A" & RowCount) End If end if Next With thanks Pol |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
To find row is empty or not
countnonblanks = Application.WorksheetFunction.CountA(Rows(2)) If countnonblanks 0 Then End If "pol" wrote: Hi all, I kindly request your help how to find a row is empty row. For example in my following code I have to give one more condition also like if rowcount = currow and rowcount is not empty // How I can give the condition Original code as follows LastRow = Range("G" & Rows.Count).End(xlUp).Row currow = ActiveCell.Row For RowCount = 1 To LastRow If RowCount = currow Then // I need to check row is empty or not If Range("A" & RowCount) = "" Or Range("A" & RowCount) = 0 Then Range("A" & RowCount) = Col_A Else Col_A = Range("A" & RowCount) End If end if Next With thanks Pol |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
To find row is empty or not
Perhaps something like:
If RowCount = currow And _ WorksheetFunction.CountA(Cells(RowCount, 1).EntireRow) 0 Then '...etc. -- Best Regards, Luke M *Remember to click "yes" if this post helped you!* "pol" wrote: Hi all, I kindly request your help how to find a row is empty row. For example in my following code I have to give one more condition also like if rowcount = currow and rowcount is not empty // How I can give the condition Original code as follows LastRow = Range("G" & Rows.Count).End(xlUp).Row currow = ActiveCell.Row For RowCount = 1 To LastRow If RowCount = currow Then // I need to check row is empty or not If Range("A" & RowCount) = "" Or Range("A" & RowCount) = 0 Then Range("A" & RowCount) = Col_A Else Col_A = Range("A" & RowCount) End If end if Next With thanks Pol |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Find first empty row | Excel Discussion (Misc queries) | |||
How to find next value if rows between are empty? | Excel Discussion (Misc queries) | |||
find the next empty row | Excel Discussion (Misc queries) | |||
find last none empty cell | Excel Discussion (Misc queries) | |||
Find an empty cell and put a dash in it? | Excel Worksheet Functions |