Query replace by VBA

  • Thread starter Thread starter kaon
  • Start date Start date
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
 
Use search and replace.

Press CTRL-H, enter ",4," in the"Find what" box and ",10," in the "replace
with" box.
 
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.
 

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

Back
Top