+ Reply to Thread
Results 1 to 3 of 3

Excel 2007 : Conditionally changing a number that was pulled from text

  1. #1
    Registered User
    Join Date
    01-22-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    16

    Lightbulb Conditionally changing a number that was pulled from text

    Hello,

    I have text in one cell such as 1. Trial 2 B . I have been using the MID function to pull out the first character and turn it into a percentage (=MID(A1,1,1)*1), and I get 10 displayed in a different cell. Is there a way to add a second formula into the same cell, that'll check what the contents are, and if they are ever "0", will replace them with "100"? Or can I embed it somehow into the MID formula?

    Thank you very much!

    PsychGirl

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

    Re: Conditionally changing a number that was pulled from text

    Without more info, something like =if(your_formula=0,100,your_formula)

  3. #3
    Registered User
    Join Date
    01-22-2011
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2008 for Mac
    Posts
    16

    Re: Conditionally changing a number that was pulled from text

    What you suggested worked, so thanks! I realize I didn't give enough details, so what I am trying to do is exchange any "0" for "100", and any "100" for "0". Here is the formula I am trying, I guess it's called a nested IF formula, and I got the idea from your response...but although it works for the MID function, it doesn't seem to be exchanging the "0" and "100"...any thoughts?

    =IF(MID(D560,5,2)*10=0, IF(MID(D560,5,2)*10=100,0,MID(D560,5,2)*10),MID(D560,5,2)*10)

+ 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