+ Reply to Thread
Results 1 to 4 of 4

Find and replace based on adjacent cells?

  1. #1
    Registered User
    Join Date
    03-15-2011
    Location
    Melbourne, Australia
    MS-Off Ver
    Excel 2003 / 2007
    Posts
    1

    Find and replace based on adjacent cells?

    Hey guys,

    I'm wondering whether or not this is possible...

    I'm sifting through ENORMOUS spreadsheets worth of data and having to manually change all the records. It would be massively helpful if it were possible to replace values based on the adjacent cell's value.

    Let me illustrate the issue...

    \1

    Lets say for every value in column B that says "CAMRY" I want to replace the cell next to in in column C to "WAGON". And for every value in column B that says "HILUX", I want to replace the value in column C to "UTILITY".

    Is this style of finding and replacing possible at all without an add-in? Or with an add-in?

    I'm sure this is possible - its just that my knowledge of Excel is somewhat limited.

    Cheers.
    Attached Images Attached Images

  2. #2
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Find and replace based on adjacent cells?

    Hi,

    you could try:

    =IF(B2="CAMRY","WAGON",IF(B2="HILUX","UTILITY",B2))
    and then copy the results in column B with paste special values.

    Hope it helps.

    Regards
    Last edited by canapone; 03-16-2011 at 12:32 AM.

  3. #3
    Registered User
    Join Date
    03-16-2011
    Location
    Indiana, USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Find and replace based on adjacent cells?

    =IF(B2="CAMRY","WAGON",IF(B2="HILUX","UTILITY",B2))
    This would only work as long as you checked only the CAMRY & HILUX values. Once the formula finds any value other than these two, it will return a 0 value. You would need to nest your "IF" functions for as many values as you wanted to test for. If you had a number of values you were checking, your IF statement could get to be quite long.

    You would want to place this formula in the destination cell. In the example you gave that would be C1 and then copy it down the column. I hope this helps.
    640K ought to be enough for anybody -Bill Gates

  4. #4
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326

    Re: Find and replace based on adjacent cells?

    Hi Leo and welcome to the board

    Posting an example is always a good idea, and to make it easier for other members it would be better to post a sample sheet to work on. You can attach a sample the same way you attached the image.

    I want to replace the value in column C to "UTILITY"
    In your question you state you want to replace an existing value in col C by another.
    Which would the original content be ?

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1