Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. Sub terfuge()
  2. ' todo: Assign keystroke shortcut
  3. If Application.DisplayAlerts Then
  4. Application.DisplayAlerts = False
  5. Else
  6. Application.DisplayAlerts = True
  7. End If
  8. End Sub
  9.  
  10. Sub Multi_FindReplace()
  11.  
  12. Dim sht As Worksheet
  13. Dim fndList As Variant
  14. Dim rplcList As Variant
  15. Dim x As Long
  16.  
  17.  
  18.  
  19. fndList = Array("#REF", "PROD DEPTPAPERLESS2016Oct")
  20.  
  21. rplcList = Array("Total", "")
  22.  
  23. 'Loop through each item in Array lists
  24. For x = LBound(fndList) To UBound(fndList)
  25. 'Loop through each worksheet in ActiveWorkbook
  26. For Each sht In ActiveWorkbook.Worksheets
  27. sht.Cells.Replace What:=fndList(x), Replacement:=rplcList(x), _
  28. LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, _
  29. SearchFormat:=False, ReplaceFormat:=False
  30. Next sht
  31.  
  32. Next x
  33.  
  34. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement