![]() |
Macro to hide rows containing no data
My spreadsheet is A1:Q308. I would like only the rows
which contain a value in the Q column that is less than zero or greater than zero to be printed. There are also some blank rows which contain no data or formulas in the A1:Q308 worksheet. I would like the macro to search the sheet, suppress the rows that do not qualify for display, and let me print what remains. |
Macro to hide rows containing no data
HAve you thought of just using Auto Filter?
"John" wrote in message ... My spreadsheet is A1:Q308. I would like only the rows which contain a value in the Q column that is less than zero or greater than zero to be printed. There are also some blank rows which contain no data or formulas in the A1:Q308 worksheet. I would like the macro to search the sheet, suppress the rows that do not qualify for display, and let me print what remains. |
Macro to hide rows containing no data
"Paul Lautman" wrote in message ... HAve you thought of just using Auto Filter? "John" wrote in message ... My spreadsheet is A1:Q308. I would like only the rows which contain a value in the Q column that is less than zero or greater than zero to be printed. There are also some blank rows which contain no data or formulas in the A1:Q308 worksheet. I would like the macro to search the sheet, suppress the rows that do not qualify for display, and let me print what remains. tHIS SEEMS TO WORK Sub ENTIREROWS() Dim X As Range Dim FLAG As Integer Range("A1").Select For Each Row In ActiveSheet.UsedRange For Each CELL In Row CELL.Select If CELL.Value "" Then FLAG = 1 Next If FLAG < 1 Then ActiveCell.Select If FLAG < 1 Then Selection.EntireRow.Delete FLAG = 0 Next End Sub N10 |
All times are GMT +1. The time now is 05:39 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com