+ Reply to Thread
Results 1 to 7 of 7

Thread: help with formula containing diverse set of conditions

  1. #1
    Registered User
    Join Date
    01-17-2012
    Location
    milwaukee, wisconsin
    MS-Off Ver
    Excel 2003
    Posts
    3

    help with formula containing diverse set of conditions

    I cannot write a formula to reflect the necessary conditions relative to the cost of barricades.
    0 = 0
    1-4 = $20
    5-20 = $31
    more than 20 = $38 plus $5 for each additional barricade over 20. So 21 barricades would be $38 + $5 = $43.00 / and 22 barricades would be $38 + $10 = $48 / and 23 barricades would be $38 + $15 = $53 / etc.

    Can anyone help?
    Last edited by germaine; 01-17-2012 at 02:49 PM.

  2. #2
    Forum Moderator arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    4,318

    Re: Help with Formula Please

    Try this - i put 21 in A2, the formula is in B2 -
    =IF(AND(A2>=1,A2<=4),20,IF(AND(A2>=5,A2<=20),31,IF(A2>20,38+((A2-20)*5),0)))
    Cheers,
    Arlette

    If I helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Registered User
    Join Date
    01-17-2012
    Location
    milwaukee, wisconsin
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Help with Formula Please

    Beautiful, but I still have one problem. Sometimes the cell will be blank because there are no barricades, this causes a problem with the formula. I have attached my spreadsheet for your review and comment. I enter the # of barricades in column E and the value in column R.
    Attached Files Attached Files

  4. #4
    Valued Forum Contributor
    Join Date
    05-14-2009
    Location
    W Europe
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    446

    Re: help with formula containing diverse set of conditions

    You'd better read and comply to post #3 before continuing...
    Cheers - THE WARNING I RECEIVED WAS NOT JUSTIFIED

  5. #5
    Forum Moderator arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    4,318

    Re: help with formula containing diverse set of conditions

    I tried my formula in your file and it works fine even if the Barricades column has blanks in some rows.
    Cheers,
    Arlette

    If I helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  6. #6
    Registered User
    Join Date
    01-17-2012
    Location
    milwaukee, wisconsin
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: help with formula containing diverse set of conditions

    Thank you, you are absolutely right and I appreciate your help more than you know. I was a bit intimidated to come back to the forum because I was scolded for not posing the question correctly.

  7. #7
    Forum Moderator arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    4,318

    Re: help with formula containing diverse set of conditions

    Actually, its not a scolding. Everyone is trying to keep the forum neat & clean . So its just a warning to ensure we dont do the wrong thing.

    Feel free to come back anytime. You will surely get the best of responses at the fastest of speed.
    Cheers,
    Arlette

    If I helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ 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.2.0