Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Excel 2003, windows xp, sp2. I need a vba way for users to scan sheets before printing for ### in columns that need to be extended before printing. They are dysfunctional in looking at print preview and are wasting time and paper. Thanks as usual for your outstanding help. Mike |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
turn on the macro recorder
select all cells, then do Find and under options tell it to look at values and uncheck whole words. I get code like: Cells.Select Range("B1").Activate Selection.Find(What:="###", After:=ActiveCell, LookIn:=xlValues, LookAt _ :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _ False, SearchFormat:=False).Activate you can adapt it to do this Dim r as Range do set r = Cells.Find(What:="###", _ After:=ActiveCell, _ LookIn:=xlValues, LookAt:=xlPart, _ SearchOrder:=xlByRows, _ SearchDirection:=xlNext, MatchCase:=False, _ SearchFormat:=False) if r is nothing then exit do r.EntireColumn.Autofit Loop -- Regards, Tom Ogilvy "Mike Molyneaux" wrote: Excel 2003, windows xp, sp2. I need a vba way for users to scan sheets before printing for ### in columns that need to be extended before printing. They are dysfunctional in looking at print preview and are wasting time and paper. Thanks as usual for your outstanding help. Mike |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Wonderful, thanks again, you guys are fantastic.
-- Mike "Mike Molyneaux" wrote: Excel 2003, windows xp, sp2. I need a vba way for users to scan sheets before printing for ### in columns that need to be extended before printing. They are dysfunctional in looking at print preview and are wasting time and paper. Thanks as usual for your outstanding help. Mike |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Search for matches in two columns | Excel Worksheet Functions | |||
search value in 2 columns return value in another | Excel Worksheet Functions | |||
search multiple columns | Excel Discussion (Misc queries) | |||
Search by columns or by rows | Excel Programming | |||
search 2 Columns Please | Excel Programming |