Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I think I wouldn't use a macro.
I'd select the range and do Data|Filter|autofilter. You can use the dropdown on each header cell and show or hide the values you want. There's even an option for Custom. "Does not equal" 0 And "does not equal" (leave blank) may be useful. John wrote: 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. -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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. |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() "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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Macro code to hide rows and not calculate hidden rows | Excel Discussion (Misc queries) | |||
Macro to hide rows | Excel Discussion (Misc queries) | |||
hide rows with macro | Excel Discussion (Misc queries) | |||
macro to hide rows | Excel Discussion (Misc queries) | |||
Macro to hide rows. | Excel Programming |