Created
April 15, 2014 15:57
-
-
Save agbishara/10743689 to your computer and use it in GitHub Desktop.
This is good if you need to quickly replace text in a workbook for a report
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sub FnR(sWhat As String, sReplacment As String, ws As Worksheet) | |
| ws.UsedRange.Replace What:=sWhat, Replacement:=sReplacment, LookAt:=xlPart, _ | |
| SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, _ | |
| ReplaceFormat:=False | |
| ws.PageSetup.CenterHeader = Replace(ws.PageSetup.CenterHeader, sWhat, sReplacment) | |
| ws.PageSetup.LeftHeader = Replace(ws.PageSetup.LeftHeader, sWhat, sReplacment) | |
| ws.PageSetup.RightHeader = Replace(ws.PageSetup.RightHeader, sWhat, sReplacment) | |
| End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment