Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am familar with the Access model, but I know nothing of Excel. How would
write a macro to find/replace and have it loop through every sheet in a workbork? The number of sheets would be varialbe in all cases, but the values for find/replace would be fixed. Also as a side note how would I select all Columns, then "right-size" to fit? Thanks a ton! |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Here is the find / replace code for you.
Sub ReplaceEverywhere() Dim wks As Worksheet For Each wks In Worksheets wks.Cells.Replace What:="This", _ Replacement:="That", _ LookAt:=xlValues, _ MatchCase:=False Next wks End Sub Try recording a macro for the Autofit and see what you get... -- HTH... Jim Thomlinson "Plumdodge" wrote: I am familar with the Access model, but I know nothing of Excel. How would write a macro to find/replace and have it loop through every sheet in a workbork? The number of sheets would be varialbe in all cases, but the values for find/replace would be fixed. Also as a side note how would I select all Columns, then "right-size" to fit? Thanks a ton! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Find and Replace - Replace with Blank Space | Excel Discussion (Misc queries) | |||
where to put results of find operation in find and replace functio | Excel Worksheet Functions | |||
find and replace - replace data in rows to separated by commas | Excel Worksheet Functions | |||
Replace method - cannot find any data to replace | Excel Programming | |||
Sluggish Search and Replace on Linked Spreadsheets | Excel Discussion (Misc queries) |