Link to home
Start Free TrialLog in
Avatar of Maliki Hassani
Maliki HassaniFlag for United States of America

asked on

VBA: Alter VBA script to find a range

Experts,

I have a script that will make changes to the entire sheet.  I am wanting to only have it apply the changes to only A5:AC30.

Can some help me modify my code?
Sub FormatChangerSurveillance()

Dim cell As Range

For Each cell In Sheets("NOC Agent Daily S").UsedRange
cell.Replace What:=":", Replacement:="."
cell.Replace What:="AM", Replacement:=" "
cell.Replace What:="PM", Replacement:=" "
Next

End Sub

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Chris Bottomley
Chris Bottomley
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Glad it helped

Chris