Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
I have seen a couple of threads on how to create a macro to DELETE blank rows
but this is not what I'm looking for. I need to be able to simply HIDE the blank rows. Does anyone know how to do this? |
#2
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Try the below
Sub Hideemptyrows() For lngRow = 1 To Cells(Rows.Count, 1).End(xlUp).Row If WorksheetFunction.CountBlank(Rows(1)) = Columns.Count _ Then Rows(lngRow).Hidden = True Next End Sub If this post helps click Yes --------------- Jacob Skaria "JForsyth" wrote: I have seen a couple of threads on how to create a macro to DELETE blank rows but this is not what I'm looking for. I need to be able to simply HIDE the blank rows. Does anyone know how to do this? |
#3
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thanks for writing back! Unfortunately it's not working...when I run it, the
rows don't become hidden...any suggestions? "Jacob Skaria" wrote: Try the below Sub Hideemptyrows() For lngRow = 1 To Cells(Rows.Count, 1).End(xlUp).Row If WorksheetFunction.CountBlank(Rows(1)) = Columns.Count _ Then Rows(lngRow).Hidden = True Next End Sub If this post helps click Yes --------------- Jacob Skaria "JForsyth" wrote: I have seen a couple of threads on how to create a macro to DELETE blank rows but this is not what I'm looking for. I need to be able to simply HIDE the blank rows. Does anyone know how to do this? |
#4
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Oops. That was my mistake.Try the below
Sub Hideemptyrows() For lngRow = 1 To Cells(Rows.Count, 1).End(xlUp).Row If WorksheetFunction.CountBlank(Rows(lngRow)) = Columns.Count _ Then Rows(lngRow).Hidden = True Next End Sub If this post helps click Yes --------------- Jacob Skaria "JForsyth" wrote: Thanks for writing back! Unfortunately it's not working...when I run it, the rows don't become hidden...any suggestions? "Jacob Skaria" wrote: Try the below Sub Hideemptyrows() For lngRow = 1 To Cells(Rows.Count, 1).End(xlUp).Row If WorksheetFunction.CountBlank(Rows(1)) = Columns.Count _ Then Rows(lngRow).Hidden = True Next End Sub If this post helps click Yes --------------- Jacob Skaria "JForsyth" wrote: I have seen a couple of threads on how to create a macro to DELETE blank rows but this is not what I'm looking for. I need to be able to simply HIDE the blank rows. Does anyone know how to do this? |
#5
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thank You!!!! It works perfectly!
"Jacob Skaria" wrote: Oops. That was my mistake.Try the below Sub Hideemptyrows() For lngRow = 1 To Cells(Rows.Count, 1).End(xlUp).Row If WorksheetFunction.CountBlank(Rows(lngRow)) = Columns.Count _ Then Rows(lngRow).Hidden = True Next End Sub If this post helps click Yes --------------- Jacob Skaria "JForsyth" wrote: Thanks for writing back! Unfortunately it's not working...when I run it, the rows don't become hidden...any suggestions? "Jacob Skaria" wrote: Try the below Sub Hideemptyrows() For lngRow = 1 To Cells(Rows.Count, 1).End(xlUp).Row If WorksheetFunction.CountBlank(Rows(1)) = Columns.Count _ Then Rows(lngRow).Hidden = True Next End Sub If this post helps click Yes --------------- Jacob Skaria "JForsyth" wrote: I have seen a couple of threads on how to create a macro to DELETE blank rows but this is not what I'm looking for. I need to be able to simply HIDE the blank rows. Does anyone know how to do this? |
#6
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Thank you!!! This works perfectly!!!
"Jacob Skaria" wrote: Oops. That was my mistake.Try the below Sub Hideemptyrows() For lngRow = 1 To Cells(Rows.Count, 1).End(xlUp).Row If WorksheetFunction.CountBlank(Rows(lngRow)) = Columns.Count _ Then Rows(lngRow).Hidden = True Next End Sub If this post helps click Yes --------------- Jacob Skaria "JForsyth" wrote: Thanks for writing back! Unfortunately it's not working...when I run it, the rows don't become hidden...any suggestions? "Jacob Skaria" wrote: Try the below Sub Hideemptyrows() For lngRow = 1 To Cells(Rows.Count, 1).End(xlUp).Row If WorksheetFunction.CountBlank(Rows(1)) = Columns.Count _ Then Rows(lngRow).Hidden = True Next End Sub If this post helps click Yes --------------- Jacob Skaria "JForsyth" wrote: I have seen a couple of threads on how to create a macro to DELETE blank rows but this is not what I'm looking for. I need to be able to simply HIDE the blank rows. Does anyone know how to do this? |
#7
![]()
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
![]()
Sub row_hide()
Dim rng As Integer, i As Integer rng = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To rng Cells(i, "A").Select x = Application.WorksheetFunction.Count(ActiveCell.Ent ireRow) If x = 0 Then ActiveCell.EntireRow.Hidden = True Next i End Sub On Jun 5, 6:08*pm, JForsyth wrote: I have seen a couple of threads on how to create a macro to DELETE blank rows but this is not what I'm looking for. I need to be able to simply HIDE the blank rows. Does anyone know how to do this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Hide Blank Rows | Excel Worksheet Functions | |||
VBA code to hide blank rows | Excel Worksheet Functions | |||
Hide Blank Rows | Excel Worksheet Functions | |||
macro to hide rows if cell is blank | Excel Worksheet Functions | |||
remove or hide blank rows | Excel Discussion (Misc queries) |