Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
I have a Excel worksheet using cells A1 to H430. There are quite a few empty
lines in this area, and when I print it out I don't want the empty lines. I want to write a macro that will check column A (row headings), if one cell has no content then the macro will hide the whole row. Can someone please show me how this can be done in VBA code? Thanks a lot. |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
ASAP Utilities, a free Add-in available at www.asap-utilities.com has a
feature that will do this for you.......... Vaya con Dios, Chuck, CABGx3 "Leo" wrote: I have a Excel worksheet using cells A1 to H430. There are quite a few empty lines in this area, and when I print it out I don't want the empty lines. I want to write a macro that will check column A (row headings), if one cell has no content then the macro will hide the whole row. Can someone please show me how this can be done in VBA code? Thanks a lot. |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks a lot. I will try it out.
"CLR" wrote: ASAP Utilities, a free Add-in available at www.asap-utilities.com has a feature that will do this for you.......... Vaya con Dios, Chuck, CABGx3 "Leo" wrote: I have a Excel worksheet using cells A1 to H430. There are quite a few empty lines in this area, and when I print it out I don't want the empty lines. I want to write a macro that will check column A (row headings), if one cell has no content then the macro will hide the whole row. Can someone please show me how this can be done in VBA code? Thanks a lot. |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Not exactly sure what you want to hide, but this may help
Dim oRow As Range For Each oRow In Range("A1:H43").Rows If Cells(oRow.Row, "F").Value = "" Then oRow.EntireRow.Hidden = True End If Next oRow -- HTH Bob Phillips (remove xxx from email address if mailing direct) "Leo" wrote in message ... I have a Excel worksheet using cells A1 to H430. There are quite a few empty lines in this area, and when I print it out I don't want the empty lines. I want to write a macro that will check column A (row headings), if one cell has no content then the macro will hide the whole row. Can someone please show me how this can be done in VBA code? Thanks a lot. |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Thanks a lot Bob. This probably is the coding I am looking for. The rows I
want to hide are those who have no content in column A. i.e., if A10 has no content, hide the entire 10th row. I will try your code to see if it works. Thanks again. "Bob Phillips" wrote: Not exactly sure what you want to hide, but this may help Dim oRow As Range For Each oRow In Range("A1:H43").Rows If Cells(oRow.Row, "F").Value = "" Then oRow.EntireRow.Hidden = True End If Next oRow -- HTH Bob Phillips (remove xxx from email address if mailing direct) "Leo" wrote in message ... I have a Excel worksheet using cells A1 to H430. There are quite a few empty lines in this area, and when I print it out I don't want the empty lines. I want to write a macro that will check column A (row headings), if one cell has no content then the macro will hide the whole row. Can someone please show me how this can be done in VBA code? Thanks a lot. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Rows & Columns in Excel | Excel Worksheet Functions | |||
convert columns to rows & rows to columns | Excel Discussion (Misc queries) | |||
How to swap rows and columns? | Excel Discussion (Misc queries) | |||
inserting columns within certain rows only | Excel Discussion (Misc queries) | |||
Removing Near-Duplicate Rows, Leaving Those w/Most Data in Specific Columns | Excel Discussion (Misc queries) |