Home

Change B3:78/3 to B3[78].3 using find and replace or similar command

Deen Brown
New Contributor

Hi, looking have a large file with data that looks like such..

B3:78/2

B3:78/3

and so on...

email pic delete me 1.PNG

I want to change them as quickly as possible to look like

B3[78].2

B3[78].3

email pic delete me 2.PNG

Can I change all at once, certain aspects of data in cells rather than have to do them one at a time?

Specifically, changint the ":" to "[ ]" and the "/" to "."

 

1 Reply

@Deen Brown 

Hi Deen,

you can do it with the following macro - look at the attached file, too.

 

Sub ReplacePart()

With Sheet1

.Range("A:A").Replace What:=":", Replacement:="[", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=True

.Range("A:A").Replace What:="/", Replacement:="].", _
LookAt:=xlPart, SearchOrder:=xlByRows, MatchCase:=False, SearchFormat:=False, ReplaceFormat:=True

End With

End Sub

 

Best regards from germany

Bernd

www.vba-Tanker.com - a database full of macros

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
38 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies