Replace

R

Ren

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
 
B

Bill Kuunders

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
 
R

Rick Rothstein \(MVP - VB\)

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
 
D

Don Guillett

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