Find and Replace with condition

[Closed]
Report
Posts
77
Registration date
Saturday September 5, 2015
Status
Member
Last seen
March 8, 2017
-
Posts
2817
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
October 14, 2021
-
Hello,
I would like to ask that in the Range D11 to D510 of all sheets in workbook find "." and replace with ". "

If in the above mention range ". " find then their would be no replacement

Thanks Regards


2 replies

Posts
2817
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
October 14, 2021
486
Hi Smuneeb,

Try this:
Select your range.
Right-click sheets tab and select "Select all sheets".
Hit Ctrl+H to open find and replace.
Enter your criteria and hit OK.

Works for me.

Best regards,
Trowa
Posts
77
Registration date
Saturday September 5, 2015
Status
Member
Last seen
March 8, 2017
1
Hi
Trowa
I think you are not happy with me.
Ok No Problem, if I did something wrong with you then I apologies
I request for Macro
but Thanks for your reply

Regards
Muneeb
Posts
2817
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
October 14, 2021
486
Hi Muneeb,

No problems here. But you didn't mention anything about a macro in your original post.

Here you go:
Sub RunMe()
Dim ws As Worksheet
For Each ws In Worksheets
    ws.Range("D11:D510").Replace What:=".", Replacement:=vbNullString, _
    LookAt:=xlPart, MatchCase:=False
Next
End Sub


Best regards,
Trowa