Replacing data in a cell

G

green72

I would like to scan specific columns (but all the rows in the specified
columns) for a certain value, in this case 99, and if a cell has a value of
99, I need to replace it with another number, 3 in this case.

I think this would be an 'if then' type of thing with a loop perhaps, but
its been so long since I worked with basic....

Any help would be appreciated.

Thanks
 
N

Niek Otten

Consider Edit>Replace

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

|I would like to scan specific columns (but all the rows in the specified
| columns) for a certain value, in this case 99, and if a cell has a value of
| 99, I need to replace it with another number, 3 in this case.
|
| I think this would be an 'if then' type of thing with a loop perhaps, but
| its been so long since I worked with basic....
|
| Any help would be appreciated.
|
| Thanks
 
D

Don Guillett

If you only want to replace a value with 99 as the only thing in the cell
select the range or column>edit>replace>options>whole
 
J

Jim Thomlinson

Lots easier than that...

Sheets("Sheet1").Columns("A").Replace 99, 3, xlWhole
 

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

Top