Find and Replace with condition

Closed
smuneeb Posts 67 Registration date Saturday September 5, 2015 Status Member Last seen March 8, 2017 - Apr 24, 2016 at 01:09 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Apr 25, 2016 at 12:16 PM
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 responses

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Apr 25, 2016 at 11:25 AM
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
0
smuneeb Posts 67 Registration date Saturday September 5, 2015 Status Member Last seen March 8, 2017 1
Apr 25, 2016 at 11:59 AM
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
0
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Apr 25, 2016 at 12:16 PM
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
0