Advertisement
Guest User

Untitled

a guest
Jan 12th, 2017
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.44 KB | None | 0 0
  1. Sub FindReplaceAll()
  2. 'PURPOSE: Find & Replace text/values throughout entire workbook
  3.  
  4. Dim sht As Worksheet
  5. Dim fnd As Variant
  6. Dim rplc As Variant
  7. Dim p As Integer
  8. Dim q As Integer
  9. p = 3
  10. q = p + 1
  11. fnd = "$3"
  12. rplc = "$" & q
  13.  
  14. For Each sht In ActiveWorkbook.Worksheets
  15. sht.Cells.Replace what:=fnd, Replacement:=rplc, _
  16. LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
  17. SearchFormat:=False, ReplaceFormat:=False
  18. Next sht
  19. p=q
  20. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement