View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson Jim Thomlinson is offline
external usenet poster
 
Posts: 5,939
Default Find and Replace across all Spreadsheets

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!