Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I want to delete rows that have nothing in the cells. How do I
determine whether all cells in a row are blank? Any help would be greatly appreciated. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Rub
Use this function Public Function IsBlankRow(ByRef ws As Worksheet, ByVal lRow&) As Boolean Dim c As Range With ws For Each c In .Rows(lRow).Cells If c.Value < "" Then IsBlankRow = False Exit Function End If Next c End With IsBlankRow = True End Function You can call it as shown below Isblankrow(worksheets("Sheet1"),5) or IsBlankRow(Sheet1,5) the second version uses the programmatic name of the sheet and hence does not need to be enclosed in double quotes. "rub" wrote: I want to delete rows that have nothing in the cells. How do I determine whether all cells in a row are blank? Any help would be greatly appreciated. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks. I will try it.
Alok wrote: Hi Rub Use this function Public Function IsBlankRow(ByRef ws As Worksheet, ByVal lRow&) As Boolean Dim c As Range With ws For Each c In .Rows(lRow).Cells If c.Value < "" Then IsBlankRow = False Exit Function End If Next c End With IsBlankRow = True End Function You can call it as shown below Isblankrow(worksheets("Sheet1"),5) or IsBlankRow(Sheet1,5) the second version uses the programmatic name of the sheet and hence does not need to be enclosed in double quotes. "rub" wrote: I want to delete rows that have nothing in the cells. How do I determine whether all cells in a row are blank? Any help would be greatly appreciated. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Determining if a range of cells is missing a formula | Excel Worksheet Functions | |||
Determining repeated cells between two workbooks | Excel Programming | |||
Determining which cells are locked. | Excel Worksheet Functions | |||
Determining the number of cells with data in a column | Excel Programming | |||
Determining Start & End Points in Selected Cells | Excel Programming |