Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
hallo,
how can erase the empty cells, outside print area? |
#2
![]() |
|||
|
|||
![]()
This works for me.
Code:
Dim pValues As Variant With ActiveSheet pValues = .Range(.PageSetup.PrintArea).Value .Cells.ClearContents .Range(.PageSetup.PrintArea).Value = pValues End With |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Watch out for formulas!
mikerickson wrote: This works for me. Code: -------------------- Dim pValues As Variant With ActiveSheet pValues = .Range(.PageSetup.PrintArea).Value .Cells.ClearContents .Range(.PageSetup.PrintArea).Value = pValues End With -------------------- er;513921 Wrote: hallo, how can erase the empty cells, outside print area? -- mikerickson -- Dave Peterson |
#4
![]() |
|||
|
|||
![]()
True. It sould be .Formula not .Value
Quote:
|
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
er
You can hide them but they cannot be deleted (XL2003) FormatRowHide or FormatColumnHide (after selecting them first) -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England DTHIS web: www.nickhodge.co.uk blog (non-tech): www.nickhodge.co.uk/blog/ "er" wrote in message ... hallo, how can erase the empty cells, outside print area? |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
** Warning ** << This standard module worked for me, but who knows
if there is an underlying problem... anyway, give it a try.. Jim May Sub Foo() Dim temp As String Dim mtemp As String Dim rng As Range temp = ActiveSheet.Names("print_area") mtemp = Right(temp, Len(temp) - 1) Set rng = ActiveSheet.UsedRange For Each c In rng If Application.Intersect(c, Range(mtemp)) Is Nothing Then c.ClearContents End If Next End Sub "er" wrote: hallo, how can erase the empty cells, outside print area? |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
CRAP, After sending you the macro -- I re-read your request only to see that
you wanted to erase "EMPTY-CELLS" (DAAAA,,) - Where as I mistakenly took your request to be erase "NONEMPTY-CELLS" outside the Print range. Oh well, I learned something in the exercise, all was not wasted.... Have a good day Jim "er" wrote: hallo, how can erase the empty cells, outside print area? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
set area in excel not giving me option to set print area? | Excel Discussion (Misc queries) | |||
print area across the freeze panes area | Excel Worksheet Functions | |||
Pivot Table macro to set print area and print details of drill down data | Excel Discussion (Misc queries) | |||
Active cell counting in particular print page (one sheet having different print area) | Excel Worksheet Functions | |||
How do you turn off a print area for a page? (no print area) | Excel Discussion (Misc queries) |