+ Reply to Thread
Results 1 to 8 of 8

currency results for if then formula???

  1. #1
    Registered User
    Join Date
    04-26-2013
    Location
    virginia
    MS-Off Ver
    Excel 2003
    Posts
    4

    currency results for if then formula???

    I am using the following formual but the results will not populate in currency format is there a quick solution to correct this? What am I missing?

    =IF(OR(Y4="6to12"),"$170.00",IF(OR(Y4="12to18"),"$210.00",IF(OR(Y4="18to24"),"$315.00",IF(OR(Y4="24to30"),"$315.00",IF(OR(Y4="30to36"),"$690.00",IF(OR(Y4="36to42"),"$790.00",IF(OR(Y4="42to48"),"$950.00",IF(OR(Y4="48to54"),"$1200.00",IF(OR(Y4="grtr54"),"$1500.00",IF(OR(Y4="6to1248HR"),"$225.00",IF(OR(Y4="12to1848HR"),"$375.00",IF(OR(Y4="18to2448HR"),"$585.00",IF(OR(Y4="24to3048HR"),"$700.00",IF(OR(Y4="30to3648HR"),"$950.00",IF(OR(Y4="36to4248HR"),"$1250.00",IF(OR(Y4="42to4848HR"),"$1500.00",IF(OR(Y4="48to5448HR"),"$1900.00",IF(OR(Y4="grtr5448HR"),"$2500.00"))))))))))))))))))

  2. #2
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: currency results for if then formula???

    First, remove all the OR's because you only have 1 expression within each OR...
    2nd, you're returning TEXT strings based on each expression, that's why they can't be formatted as currencey (this requires numeric entries).

    So change all the resulting values to just numbers like 170 and 210 and 315 etc..

    =IF(OR(Y4="6to12"),"$170.00",IF(OR(Y4="12to18"),"$210.00",IF(OR(Y4="18to24"),"$315.00",etc..
    would be
    =IF(Y4="6to12",170,IF(Y4="12to18",210,IF(Y4="18to24",315,etc..

    Then you can apply your currency format.



    Also, I'd be interested to see an actual copy of your book..
    What is in Y4, a formula?
    Where do the 6to12 and 12to18 values come from?

    I would think some sort of lookup would probalby work much better/easier.

  3. #3
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,466

    Re: currency results for if then formula???

    I am wondering if "6to12" means a range of {6,7,8,9,10,11,12}?
    If yes, try LOOKUP instead.
    Quang PT

  4. #4
    Registered User
    Join Date
    04-26-2013
    Location
    virginia
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: currency results for if then formula???

    Thanks for the input...I am a self taught xcel dummy. so any assistance is a good thing.

    the Y4 is another cell. Quickly this sheet inserts a price for a service (tree removal) the 6to12 ect are tree sizes by diameter.

    I am not familiar with LOOKUP... will research that if that is easier ...took my awhile to develop the formula I am using....

  5. #5
    Registered User
    Join Date
    04-26-2013
    Location
    virginia
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: currency results for if then formula???

    Here is a sample of the sheet
    Attached Files Attached Files

  6. #6
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: currency results for if then formula???

    Good, you already have half the lookup table built in AH3:AH20
    All you have to do is add the corresponding values to each item in the next column AI3:AI20
    I.E.
    AI3 = 170
    AI4 = 210
    AI5 = 315
    etc..

    Then use VLOOKUP
    VLOOKUP(Y4,$AH$3:$AI$20,2,FALSE)

    And then to avoid the Errors when Y is blank, add in Iferror
    =IFERROR(VLOOKUP(Y4,$AH$3:$AI$20,2,FALSE),"")


    Hope that helps.

  7. #7
    Registered User
    Join Date
    04-26-2013
    Location
    virginia
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: currency results for if then formula???

    OMG...that works perfectly!!1 and so much more simple than all that if or then crap!!!

    Thanks a million!!!

  8. #8
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: currency results for if then formula???

    Great, glad to help.

+ 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