Query replace by VBA

K

kaon

Hi all,

I have 5x cells with the formula like
VLOOKUP(B3,PNOA!A:Z, 4, FALSE) / 1000

How can I do query replace the 4 by other value, say 10, for cell
having the similar formula? To be precise, I wonder how can I replac
the 4 without using functions like left(), right()?

Thanks in advance
 
D

DFStoneJr

Use search and replace.

Press CTRL-H, enter ",4," in the"Find what" box and ",10," in the "replace
with" box.
 
T

Tom Ogilvy

Select the cells that contain the formula. If they are not together
you can select as big a group as you want to include them all as lon
as the ones you don't want changed to not contain an identical searc
string.

then do Edit=>Replace

Replace What: 4, FALSE)

Replace with: 10, FALSE)

Do you formulas really have spaces in them. If so, place them in th
search strings so it is an exact match. Anyway, you want to get
unique "target" so you don't change things you don't want changed.

Leave Find Entire Cells Only unchecked and use Match Case a
appropriate.

So no code required.
 
Top