Replace Value in one field with cell value in same row

  • Thread starter Thread starter dan
  • Start date Start date
D

dan

I am trying to figure out how to replace a number string in one cell
with a value in another cell in the same row? I have this data in cell
A1 (S07003!K2SKIS) and I want to replace S07003 with the value in cell
B1 I have tried find and replace but I dont know the syntax to so
that this will continue for cells A1-A10 with the values in cells B1-
B10?
 
If it will always be S07003:
=SUBSTITUTE(A1,"S07003",B1)

For variable data:
Is there truly a parenthesis infront of the data, or did you just do
that for the post? If the parenthesis is really there, this will
replace the characters up to the exclamation point with the value in
B1:
=SUBSTITUTE(A1,MID(A1,2,FIND("!",A1,1)-2),B1)

If the parenthesis is not there:
=SUBSTITUTE(A1,LEFT(A1,FIND("!",A1,1)-1),B1)

There are other ways to accomplish this as well.
 

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