Macro Find/Replace

Jette3173

New Member
Joined
Oct 29, 2024
Messages
18
Office Version
  1. 365
Platform
  1. Windows
  2. Web
Hello,

I am needing to add to my existing Macro to replace the value in a column after filtering for the range.
I have 3 users that I need it to find (column A), then replace the text in Column B. (example below to protect privacy)


UserAll CUR Complete
111Not Complete
111Not Complete
111Not Complete
222Not Complete
222Not Complete
222Not Complete
333Not Complete
333Not Complete
333Not Complete

I've tried the following code but I can only get the filter, it will not replace the text from "Not Complete" to "Complete"

VBA Code:
With ActiveSheet
        If .AutoFilterMode Then .AutoFilterMode = False
        .Range("A1:B" & .Range("B" & Rows.Count).Row).AutoFilter 1, Array("111", "222", "333"), xlFilterValues
        .AutoFilter.Range.Offset(1).ActiveSheet.Range("B:B").Replace "Not Complete", "Complete"
        .ShowAllData
End With
 
Try change to

Rich (BB code):
        .AutoFilter.Range.Offset(1).Columns(2).Replace "Not Complete", "Complete"
 
Upvote 0
Solution

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top