Replace

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I replace Champion's location? Ajax and Champion have the same
location- but i need to change Champion's location from New York City to San
Francisco.


Customer Customer Location
Ajax New York City
Champion New York City
Baker Toronto
Ajax New York City
Champion New York City
Ajax New York City
Ajax New York City
Baker Toronto
Champion New York City
Ajax New York City
Champion New York City
Baker Toronto
Ajax New York City
Champion New York City
Champion New York City
Baker Toronto
Ajax New York City
Champion New York City
Baker Toronto
Ajax New York City
 
One way

enter in a help column say column C
=IF(A2="Champion","SanFrancisco",B2)
extend this down and change into values by using
edit ,copy,, paste special,, values
delete column B
 
You are looking to **permanently** replace the Champion "New York City" with
"San Francisco", right?

Assuming your data starts on Row 2, put this formula in a helper column
(assumed to be Column C for this example)...

=IF(A2="Champion","San Francisco",B2)

and then copy it down through all of your data rows. Next, select from C2
down to the last data row in C; then select Edit/Copy from Excel's menu bar
(or, alternately, key-in Ctrl+C); then make B2 the active cell and select
Edit/PasteSpecial form Excel's menu bar, select the Values option button
from the Paste section of the dialog box and click the OK button; then hit
the Esc key to unselect the Column C cells; and, finally, delete all of
Column C.

Rick
 
sub changelocation()
for each c in range("a2:a22")
if c="Champion" then c.offset(,1)="San Francisco"
next c
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

using pivot table 3
Find, Filter and Paste Duplicates 1
Columns 2
Pivot Table Sort Field Help 3
merge 3
Copy Unique Record 2
How to do lists 3
Countif with two criteria 2

Back
Top