+ Reply to Thread
Results 1 to 9 of 9

Calculator for how much people need to pay when we go on holiday

  1. #1
    Registered User
    Join Date
    07-20-2019
    Location
    London
    MS-Off Ver
    16.26
    Posts
    5

    Calculator for how much people need to pay when we go on holiday

    Hi guys,

    I have a spreadsheet I'm trying to make which determines how much people need to pay when we go on holiday. There are multiple guests, and they are not staying for the same amount of time during the holiday.
    Please see the attachment, as Im undoubtably not going to explain it very well.

    I'll use 1 cell as an example of what I want to achieve;
    I need E18 to become one of seven values (B7, B8, B9, B10, B11, B12) depending on what the value of D26 is.

    so, if D26 is 3, then E18 value should become 17.22, but only if I put a value in D18.
    If D18 has no value, E18 should be 0 or have no value.

    Please see attached file.

    Thanks in advance everyone!

    T
    Attached Files Attached Files

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,443

    Re: Calculator for how much people need to pay when we go on holiday

    Administrative Note:

    Welcome to the forum.

    We would very much like to help you with your query, however the thread title does not really convey what your request is about.

    Please take a moment to amend your thread title. Make sure that the title properly explains your request. Your title should be explicit and not be generic (this includes function names used without an indication of what you are trying to achieve).

    Please see Forum Rule #1 about proper thread titles and adjust accordingly. To edit the thread title, open the original post to edit and then click on Go Advanced (bottom right) to access the area where you can edit your title.

    (Note: this change is not optional. As you are new here, I have done it for you this time.)
    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
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,443

    Re: Calculator for how much people need to pay when we go on holiday

    In E18:

    =IF(D18="","",INDEX($B$7:$B$12,MATCH(D$26,$A$7:$A$12,0)))

    However, you need to change the lookup range to this:

    Excel 2016 (Windows) 32 bit
    A
    B
    7
    7
    £7.38
    8
    6
    £8.61
    9
    5
    £10.33
    10
    4
    £12.92
    11
    3
    £17.22
    12
    2
    £25.83
    Sheet: Sheet1

  4. #4
    Registered User
    Join Date
    07-20-2019
    Location
    London
    MS-Off Ver
    16.26
    Posts
    5

    Re: Calculator for how much people need to pay when we go on holiday

    Wow, that's pretty neat. Ive not used MATCH before, now I'm going to look up how to use that more often.

    subsequent quesion; using that formula has made B18 (where the formula is =E18+G18+I18+K18+M18+O18+Q18+S18+U18+W18+Y18+AA18+AC18+AE18+AG18+AI18) give an error #VALUE!, same with B26.

    Since I'm not super familiar with the new formula, I'm not sure why this is happening.

    Thoughts?

    Cheers!

    T

  5. #5
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,443

    Re: Calculator for how much people need to pay when we go on holiday

    The formula in that cell in your sample file is this:

    =SUM(E18:AK18)

    which, of course, is wrong anyway.

    Try this instead:

    =SUMIF($E$17:$AK$17,"<>",$E18:$AK18)
    Last edited by AliGW; 07-20-2019 at 07:04 AM.

  6. #6
    Registered User
    Join Date
    07-20-2019
    Location
    London
    MS-Off Ver
    16.26
    Posts
    5

    Re: Calculator for how much people need to pay when we go on holiday

    I think I solved it, I added a 0
    original
    =IF(D18="","",INDEX($B$7:$B$12,MATCH(D$26,$A$7:$A$12,0)))
    amended
    =IF(D18="","0",INDEX($B$7:$B$12,MATCH(D$26,$A$7:$A$12,0)))

  7. #7
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,443

    Re: Calculator for how much people need to pay when we go on holiday

    No need to do that - not efficient or pretty.

    See post #5.
    Attached Files Attached Files
    Last edited by AliGW; 07-20-2019 at 07:13 AM.

  8. #8
    Registered User
    Join Date
    07-20-2019
    Location
    London
    MS-Off Ver
    16.26
    Posts
    5

    Re: Calculator for how much people need to pay when we go on holiday

    Thanks AliGW, mind blown.

    much appreciated.

    T

  9. #9
    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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,443

    Re: Calculator for how much people need to pay when we go on holiday

    Workbook attached above.

    You are obviously at the start of your Excel journey - stick with us here and you'll learn fast.

    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. [SOLVED] Help! Need a solution for nested IF for multiple conditions.
    By Tracy Tan in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-11-2016, 04:03 AM
  2. Finding a Better Solution than 20+ Nested IF Functions
    By mrmcmillanrevis in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 09-04-2015, 12:37 PM
  3. Too Many Nested IF Statements -Another Solution?
    By cdesoi in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-18-2012, 03:59 PM
  4. Nested IF too long? Need solution?
    By YNWA in forum Excel General
    Replies: 1
    Last Post: 06-21-2012, 09:22 AM
  5. Solution for more Nested IF
    By VKR in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 11-19-2011, 08:35 AM
  6. Nested Ifs and what's the best solution?
    By filipemb in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-26-2008, 11:41 AM
  7. Solution : Nested IF or VLOOKUP
    By sachinattri in forum Excel General
    Replies: 9
    Last Post: 12-03-2007, 07:56 PM

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