Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Only Columns with Sum() in Row 43 <0
I don't know, but it is a lot.
I know I had one with over 7000 individual Areas (non - contiguous) -- Regards, Tom Ogilvy Ron de Bruin wrote in message ... Hi Tom How many ranges can you use with union. what is the limit? -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Tom Ogilvy" wrote in message ... Dim cell as Range, rng as Range for each cell in Range("C43:AZ43") if cell.Value = 0 then if rng is nothing then set rng = cell else set rng = union(rng,cell) end if end if Next if not rng is nothing then rng.EntireColumn.Hidden = True End if -- Regards, Tom Ogilvy JMay wrote in message news:V324b.32396$xf.15803@lakeread06... I have sheet templates 50 columns wide - Often times when completed 15 or 20 columns are all $0.00 and my Total (row 43) has =Sum(X10:X42) = $0.00 In my Workbook_BeforePrint what code would I enter to test and Hide all columns from printing where the row 43's (Columns C - AZ) Sum() = $0.00? TIA... |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Only Columns with Sum() in Row 43 <0
Thanks Tom for the info
I think I will use it more in the future. -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Tom Ogilvy" wrote in message ... I don't know, but it is a lot. I know I had one with over 7000 individual Areas (non - contiguous) -- Regards, Tom Ogilvy Ron de Bruin wrote in message ... Hi Tom How many ranges can you use with union. what is the limit? -- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "Tom Ogilvy" wrote in message ... Dim cell as Range, rng as Range for each cell in Range("C43:AZ43") if cell.Value = 0 then if rng is nothing then set rng = cell else set rng = union(rng,cell) end if end if Next if not rng is nothing then rng.EntireColumn.Hidden = True End if -- Regards, Tom Ogilvy JMay wrote in message news:V324b.32396$xf.15803@lakeread06... I have sheet templates 50 columns wide - Often times when completed 15 or 20 columns are all $0.00 and my Total (row 43) has =Sum(X10:X42) = $0.00 In my Workbook_BeforePrint what code would I enter to test and Hide all columns from printing where the row 43's (Columns C - AZ) Sum() = $0.00? TIA... |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Only Columns with Sum() in Row 43 <0
30
In article , keepitcool wrote: union uses paramarray.. so i think it's 29 in 1 go. |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Only Columns with Sum() in Row 43 <0
Welcome back J.E
-- Regards Ron de Bruin (Win XP Pro SP-1 XL2002 SP-2) www.rondebruin.nl "J.E. McGimpsey" wrote in message ... 30 In article , keepitcool wrote: union uses paramarray.. so i think it's 29 in 1 go. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
Print Only Columns with Sum() in Row 43 <0
Thanks, Ron. Just had my second 4-week stint with no internet
connection in less than a year. Withdrawal is horrendous... In article , "Ron de Bruin" wrote: Welcome back J.E |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Can I print more columns underneath other columns on one page? | Setting up and Configuration of Excel | |||
Print Set Up Using Columns | Setting up and Configuration of Excel | |||
print 4 alternate columns | New Users to Excel | |||
How do you print just certain columns?? | Excel Discussion (Misc queries) | |||
Print Only Columns with Sum() in Row 43 <0 | Excel Programming |