+ Reply to Thread
Results 1 to 5 of 5

Multiple IF statements??

  1. #1
    Registered User
    Join Date
    04-05-2007
    Posts
    2

    Question Multiple IF statements??

    Hi! I haven't done much with logic in Excel, and I've tried to figure out my problem looking at some How-To type things, but nothing I plug in is turning out any values. I guess I'm not sure if what I want is even possible. But here is what I want to do. I have ticket prices for concerts in one column. In another column I have customer service charges. The customer service charges are determined by the price of the ticket according to a set of ranges as follow:

    If $0 < ticket price < $9.99, then CSC = $2.75
    If $10 < ticket price < $19.99, then CSC = $3.50
    If $20 < ticket price < $29.99, then CSC = $4.25 ...etc...

    I need to create an Excel-friendly formula which will turn out those CSC values according to which range a previous value falls into.

    Is this possible to do, and have I provided enough information? Please help!

    Thank you!
    Sarah

  2. #2
    Forum Expert mrice's Avatar
    Join Date
    06-22-2004
    Location
    Surrey, England
    MS-Off Ver
    Excel 2013
    Posts
    4,967
    Try this user defined function

    Please Login or Register  to view this content.
    In the VBA editor, add a moldule and paste in the above code.

    In the sheet type = CSC(A1) etc.
    Martin

  3. #3
    Registered User
    Join Date
    04-05-2007
    Posts
    2
    Ahhh, wonderful. Thanks so much for your help!

    Sarah

  4. #4
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    If you don't want to use a UDF (user-defined function), a simple LOOKUP formula would also suffice:

    =LOOKUP(A1,{0,10,20},{2.75,3.5,4.25})

    Assuming your ticket price is in column A, put this in another column and fill down as many rows are in column A. Anything less than 10 will result in 2.75; if it's between 10 and 19.99 you'll get 3.5; anything greater than 20 will result in 4.25.

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    Microsoft 365
    Posts
    14,697
    If your rates keep rising at the same rate perhaps

    =(A1>0)*2+ROUNDUP(A1,-1)*0.075

+ 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