+ Reply to Thread
Results 1 to 8 of 8

Nesting IF Statements that reference 2 different Cells

Hybrid View

  1. #1
    Registered User
    Join Date
    01-19-2015
    Location
    USA
    MS-Off Ver
    Microsoft Office:MAC 2011
    Posts
    18

    Nesting IF Statements that reference 2 different Cells

    Thank you so much for the reply and the time. I am creating a sheet that calculates tips for bartenders. There could be 1,2, or 3 bartenders on a shift (B12) and they share their tip with a barback. That part of the equation is IF($B$11=1,$S$12,IF($B$11=2,$S$13,IF($B$11=3,$S$14 - S column contains the formula for calculating the tip

    But if there is no barback IF(B32)=”0”then they would receive a different amount calculated in the "T" column IF($B$11=1,$T$12,IF($B$11=2,$T$13,IF($B$11=3,$T$14,
    Last edited by JonWeb; 06-25-2020 at 05:18 PM.

  2. #2
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Not Even Sure This is Possible

    please explain what you are trying to achieve.

    If we break your formula down then

    =indirect("$S$" & $B$11 + 9)
    Would return

    B11
    1 = S10
    2 = S11
    3 = S12
    4 = S13
    5 = S14
    6 = S15

    So

    =If($B$32 =0,indirect("$T$" & $B$11 + 11),indirect("$S$" & $B$11 + 9))

    Returns the contents of S10 if B32 <> 0 and B11 =1 it Returns the contents of T12 if B32 = 0 and B11 =1
    Last edited by mehmetcik; 06-25-2020 at 04:36 PM.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

  3. #3
    Registered User
    Join Date
    01-19-2015
    Location
    USA
    MS-Off Ver
    Microsoft Office:MAC 2011
    Posts
    18

    Re: Not Even Sure This is Possible

    Thank you so much for the reply and the time. I am creating a sheet that calculates tips for bartenders. There could be 1,2, or 3 bartenders on a shift (B12) and they share their tip with a barback. That part of the equation is IF($B$11=1,$S$12,IF($B$11=2,$S$13,IF($B$11=3,$S$14 - S column contains the formula for calculating the tip

    But if there is no barback IF(B32)=”0”then they would receive a different amount calculated in the "T" column IF($B$11=1,$T$12,IF($B$11=2,$T$13,IF($B$11=3,$T$14,

  4. #4
    Registered User
    Join Date
    01-19-2015
    Location
    USA
    MS-Off Ver
    Microsoft Office:MAC 2011
    Posts
    18

    Re: Not Even Sure This is Possible

    Quote Originally Posted by mehmetcik View Post
    please explain what you are trying to achieve.

    If we break your formula down then

    =indirect("$S$" & $B$11 + 9)
    Would return

    B11
    1 = S10
    2 = S11
    3 = S12
    4 = S13
    5 = S14
    6 = S15

    So

    =If($B$32 =0,indirect("$T$" & $B$11 + 11),indirect("$S$" & $B$11 + 9))

    Returns the contents of S10 if B32 <> 0 and B11 =1 it Returns the contents of T12 if B32 = 0 and B11 =1
    Thank you so much for the reply and the time. I am creating a sheet that calculates tips for bartenders. There could be 1,2, or 3 bartenders on a shift (B12) and they share their tip with a barback. That part of the equation is IF($B$11=1,$S$12,IF($B$11=2,$S$13,IF($B$11=3,$S$14 - S column contains the formula for calculating the tip

    But if there is no barback IF(B32)=”0”then they would receive a different amount calculated in the "T" column IF($B$11=1,$T$12,IF($B$11=2,$T$13,IF($B$11=3,$T$14,

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,379

    Re: Not Even Sure This is Possible

    Administrative Note:

    We would very much like to help you with your query, however the thread title does not really convey what your request is about. Tell us what you are trying to do, not how you think it should be done.

    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. No help to be offered until this moderation request has been fulfilled.)
    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. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  6. #6
    Registered User
    Join Date
    01-19-2015
    Location
    USA
    MS-Off Ver
    Microsoft Office:MAC 2011
    Posts
    18

    Re: Not Even Sure This is Possible

    Hi Ali I changed the thread title. Thanks

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,379

    Re: Nesting IF Statements that reference 2 different Cells

    Yes, and I have already reinstated your post and deleted mine with an explanatory note.

  8. #8
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,935

    Re: Nesting IF Statements that reference 2 different Cells

    (How to) Upload a Workbook directly to the Forum
    (please do not post pictures or links to worksheets)
    • Click Advanced next to "Post Quick Reply" button at the bottom right of the editor box.
    • Scroll down until you see "Manage Attachments",
    • Click the "Choose" button at the upper left (upload from your computer).
    • Select your file, click "open", click "upload"
    • Once the upload is completed the file name will appear below the input boxes in this window.
    • Close the Attachment Manager window.
    • Click "Submit Reply"
    Note: Please do not attach password protected workbooks/worksheets
    Ensure to disable any Workbook Open/Autorun macros before attaching!
    Ben Van Johnson

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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