Confine Find and Replace

Alan C

Active Member
Joined
Feb 19, 2002
Messages
264
Can Find and Replace be confined to a single column without finding all instance of the subject in the entire sheet? In the problem column I have Cities and States. I want to find all the states and replace with nothing. There are other columns with states in them and I don't want them affected. Any help will be appreciated.

Thanks,

Alan
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Like Steve said or a macro can easily be created to search a specific range for values and then replace. Since you mention states is it going to be all 50 states or just a couple? What column is the "states" in. Do you want to replace with the word "nothing" or clear the cells contents? More information is needed for that though.
 
Upvote 0
Steve:

I don't think that works, because it returns many more instances in number than the column contains.

Alan
 
Upvote 0
Alan, it worked for me. I just highlighted the column, then did the find/replace.

Just tested it again and it only changed the column or range that was selected.

Create a test sheet with your data and give it a shot.

maybe you have more instances than you thought.
 
Upvote 0
Stnkynts:

Thanks for the response. It's one state that has to be removed and replaced with no state name. I thought that by selecting the column, the search would be confined to that one column, but it keeps returning many more than is contained in the selected cells and that is why I think this is counting in additional areas.

Thanks all,

Alan
 
Upvote 0
Can Find and Replace be confined to a single column without finding all instance of the subject in the entire sheet? In the problem column I have Cities and States. I want to find all the states and replace with nothing. There are other columns with states in them and I don't want them affected. Any help will be appreciated.

Thanks,

Alan

Alan,

You can use a function or a VBA solution but before either solution can be posted, it would be helpful to know
#1) which col. you want to perform the find & replace
#2) what the actual data looks like.

e.g.
Chicago, IL
Chicago IL
Chicago, Illinois
Chicago Illinois

Why don't you post some more details? You will get better answers that way.
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,833
Members
452,947
Latest member
Gerry_F

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