The new forums will be named Coin Return (based on the most recent vote)! You can check on the status and timeline of the transition to the new forums here.
The Guiding Principles and New Rules document is now in effect.

Excel question

KyouguKyougu Registered User regular
edited February 2010 in Help / Advice Forum
Quick excel question. I have a spreadsheet that has a column of over 100+ data. In these fields there's only around 5 different variables, such as "XXXX". "XXY", "XYX". Now I'm getting word we want to change these variables. So "XXX" becomes "111", "XXY" becomes "112" etc.

Is there an easy way to tell excell to convert one variable into another one? Really don't want to retype everything by hand.

Kyougu on

Posts

  • GrundlestiltskinGrundlestiltskin Behind you!Registered User regular
    edited February 2010
    Could you just do a find/replace?

    Grundlestiltskin on
    3DS FC: 2079-6424-8577 | PSN: KaeruX65 | Steam: Karulytic | FFXIV: Wonder Boy
  • KyouguKyougu Registered User regular
    edited February 2010
    Could you just do a find/replace?

    Well yeah, if I wanted to do it the easy way. :P

    Not sure how I didn't think about that. Thanks!

    Kyougu on
  • MonkeighyMonkeighy Registered User regular
    edited February 2010
    Make sure you use 'exact match' or 'match whole word' (can't remember what it is called in Excel) otherwise if you do a find and replace on XXX it would also replace it in XXXYYY for instance.

    Hope that made sense!

    Monkeighy on
  • LaOsLaOs SaskatoonRegistered User regular
    edited February 2010
    You could also write a nested IF formula if you know that there are always only going to be certain values that you want to change.

    =IF($A2="XXX","111",IF($A2="XXYX","1121",IF($A2="YYY","222","")))

    That will replace all isntances of XXX, XXYX, and YYY with your new values, and if it's neither of those three values, it will just leave the cell blank.

    You can then Copy and Paste Special - Values over the original values.

    This is, of course, a little bit more work than Find+Replace but will definitely only replace how you want things to be replaced.

    LaOs on
  • rfaliasrfalias Registered User regular
    edited February 2010
    For real, do it the easy way.

    Find X
    Replace with 1

    Replace All.

    Do the same for Y Z ABCDED*AYR(P&G

    rfalias on
Sign In or Register to comment.