+ Reply to Thread
Results 1 to 17 of 17

Excel frustration with multiple IF statements

  1. #1
    Registered User
    Join Date
    03-28-2017
    Location
    Wisconsin
    MS-Off Ver
    2016
    Posts
    7

    Excel frustration with multiple IF statements

    Excel is one of those things where I really hate having to figure out complex formulas. Anyways... I'm struggling with the following formula.

    (see attachment since this page's Sucuri wouldn't let me post with it....

    What I need this formula to do is Check a number (B21) against 6 different ranges of numbers. Then if B21 is between a particular range it then needs to multiply B21 by another cell that is matched with that range IE C3, D3,E3,F3,G3 or H3. Maybe I'm over complicating this but I've been grinding at this for hours now, tried various different formulas and I can't seem to figure it out. Hence I'm reaching out to the world since there are without a doubt smarter people out there than me at this.

    Thanks in advance.

    DM
    Attached Images Attached Images

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,396

    Re: Excel frustration with multiple IF statements

    The image is very tiny and difficult to read, but I am guessing from what I can make out that a LOOKUP or VLOOKUP statement would be better for you. Post your formula with spaces either side of the < and > symbols so that the Sucuri firewall doesn't kick in.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    03-28-2017
    Location
    Wisconsin
    MS-Off Ver
    2016
    Posts
    7

    Re: Excel frustration with multiple IF statements

    Hi. If you Right click the image and select "View image" you'll be able to see the formula.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,396

    Re: Excel frustration with multiple IF statements

    No, sorry - I'm not jumping through hoops. I have explained how to place the formula here so that (a) it's easy to read and (b) anyone wanting to help can copy and adapt it for you. Or, you could attach the workbook.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.

  5. #5
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,135

    Re: Excel frustration with multiple IF statements

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? Please don't attach a picture of one (no-one will want to re-type all your stuff before starting).

    1. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired solution is also shown (mock up the results manually).

    3. Make sure that all confidential information is removed first!!

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  6. #6
    Registered User
    Join Date
    03-28-2017
    Location
    Wisconsin
    MS-Off Ver
    2016
    Posts
    7

    Re: Excel frustration with multiple IF statements

    Ok I attached the Excel sheet I've been working on, added in some fake data and removed anything that was irrelevant. Here is the breakdown:

    Anything highlighted in Grey is changeable data fields that need to be used in the calculation for "Gross Monthly Revenue"
    Anything under the Orange banner Fields C3:H12 are fixed prices that need to be used in the calculation for "Monthly Fees"
    Anything highlighted in blue are the total number of subscribers for that particular service and is used in both calculations
    Disregard anything highlighted in Purple

    Fields B3:B4, B7:B8, B11:B12 are the MSRP pricing set by the customer.
    Fields B21:B22, B25:B26, B29:B30 are the total subscribers for that particular service.

    Calculations needed:
    Gross Monthly Revenue: MSRP pricing X the # of subscribers for all 6 products but only if the total number of subscribers is equal to or greater than 1000 for that particular service. EX: B3xB21 + B4xB22 + B7xB25 + B8xB26 + B11xB29 + B12xB30.

    Monthly Fees: This is more complicated. This calculation needs to find the appropriate "Volume discounted price" based on the number of subscribers, multiply that number to the number of subscribers, do this for all 6 fields and then total it all but it should only do the calculation if the total number of subscribers is equal to or greater than 1000 for that particular service.

    Net Monthly Revenue: "Gross Monthly Revenue - Monthly Fees"


    Let me know if I need to clarify anything and I appreciate all the help.
    Attached Files Attached Files
    Last edited by digitalmind1021; 03-28-2017 at 11:56 AM. Reason: Attachment

  7. #7
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,135

    Re: Excel frustration with multiple IF statements

    Where are the total number of subscribers??

  8. #8
    Registered User
    Join Date
    03-28-2017
    Location
    Wisconsin
    MS-Off Ver
    2016
    Posts
    7

    Re: Excel frustration with multiple IF statements

    Eh.. I shifted some of the cells and didn't update them when I wrote everything up. Here is the updated data.

    Fields B17:B18, B21:B22, B25:B26 are the total subscribers for that particular service.

  9. #9
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,135

    Re: Excel frustration with multiple IF statements

    So. I'm not 100% certain this is what you're after, but I think it is.

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files

  10. #10
    Registered User
    Join Date
    03-28-2017
    Location
    Wisconsin
    MS-Off Ver
    2016
    Posts
    7

    Re: Excel frustration with multiple IF statements

    Unfortunately that isn't correct.

    To help simplify things I made some changes. In this attachment I will only be focusing on the formula for G7.

    Key: The cell B7 is the total number of monthly subscribers. The number in B7 will dictate the Volume Discount rate (Cells C3, D3, E3, F3, G3, H3), These are the fees our customer will be charged based on the total number of subscribers in cell B7.

    An Example:

    If the total number of subscribers in B7 are less than 1000, then a message of "Minimum not met" will be generated,

    If the number of subscribers in cell B7 is between 1000 and 24999 then 9$ will be the fee and you will multiply 9*B7

    If the number of subscribers in cell B7 is between 25,000 and 49999 then the fees will be 8$ and you will multiply 8*B7, so on and so forth for the remaining ranges in cells E3, F3, G3, H3

    Hopefully this helps clarify a few things.

    -DM
    Attached Files Attached Files

  11. #11
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,396

    Re: Excel frustration with multiple IF statements

    From your last post, this seems to be what you are after:

    =IF(B7 < 1000,"Minimum Not Met",B7*LOOKUP(B7,{1000,25000,50000,150000,300000,500000},{9,8,7,6,5,4}))

  12. #12
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,135

    Re: Excel frustration with multiple IF statements

    AliGW, closer, but not yet there. I think.

    Digital....

    1. I assume that in your post the A17 /18 etc are not accurate and should really read as shown here (in the file). Yes or No?

    2. Do you want the discount criteria applied at the PRODUCT level (eg row 16) or at the customer category level (e.g. separately at rows 17 & 18).
    Attached Files Attached Files

  13. #13
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,135

    Re: Excel frustration with multiple IF statements

    Is this closer (some rearrangements in yellow)??
    Attached Files Attached Files

  14. #14
    Registered User
    Join Date
    03-28-2017
    Location
    Wisconsin
    MS-Off Ver
    2016
    Posts
    7

    Re: Excel frustration with multiple IF statements

    1: You are correct. Good catch
    2: They apply to the customer category level (e.g. separately at rows 17 & 18)

  15. #15
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,135

    Re: Excel frustration with multiple IF statements

    Final effort. Does this do it? I may have added the wrong attachment a bit earlier up this chain... apologies for any confusion caused.
    Attached Files Attached Files

  16. #16
    Registered User
    Join Date
    03-28-2017
    Location
    Wisconsin
    MS-Off Ver
    2016
    Posts
    7

    Re: Excel frustration with multiple IF statements

    That sir is the ticket! Right on. That formula is a lot more straight forward than I thought... I was embedding a ton of IF statements. Didn't think to go this route.

    I greatly appreciate everyone help on this. Really I do.... Thank you!

  17. #17
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2405 (Windows 11 23H2 64-bit)
    Posts
    81,396

    Re: Excel frustration with multiple IF statements

    You're welcome! :0

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Multiple if statements in excel
    By sjbowen88 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-05-2015, 01:18 PM
  2. Excel 2013 learning gap frustration
    By xl2000 in forum Excel Charting & Pivots
    Replies: 2
    Last Post: 10-16-2014, 09:29 PM
  3. [SOLVED] Multiple IF Statements in Excel 2010
    By robmun50 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-21-2014, 11:16 AM
  4. From Excel to Word VBA, an exercise in frustration
    By Decumanusmaximus in forum Word Programming / VBA / Macros
    Replies: 2
    Last Post: 02-24-2014, 07:26 PM
  5. Replies: 12
    Last Post: 05-15-2009, 08:38 AM
  6. open new instance of excel. Plese cure my frustration
    By matt charlton in forum Excel General
    Replies: 2
    Last Post: 05-23-2005, 05:06 PM
  7. How do I set up multiple if statements in Excel?
    By LKraft0318 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-09-2005, 06:06 PM

Tags for this Thread

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