Closed Thread
Results 1 to 3 of 3

nesting an IF() function inside an already complex multiple IF() function

  1. #1
    Registered User
    Join Date
    10-10-2016
    Location
    Coimbra, Portugal
    MS-Off Ver
    2016
    Posts
    86

    nesting an IF() function inside an already complex multiple IF() function

    Hi.

    I have this scenario:

    Wrong.jpg

    E3: =IF($K3="—", F3-1, IF(HLOOKUP($K3, $B$2:$F$2, 1, 0) = E$2, $G3, IF(HLOOKUP($K3, $B$2:$F$2, 1, 0) > E$2, F3-1, "—")))
    D3: =IF($K3="—", E3-1, IF(HLOOKUP($K3, $B$2:$F$2, 1, 0) = D$2, $G3, IF(HLOOKUP($K3, $B$2:$F$2, 1, 0) > D$2, E3-1, "—")))
    C2: =IF($K3="—", D3-1, IF(HLOOKUP($K3, $B$2:$F$2, 1, 0) = C$2, $G3, IF(HLOOKUP($K3, $B$2:$F$2, 1, 0) > C$2, D3-1, "—")))
    B3: =IF($K3="—", C3-1, IF(HLOOKUP($K3, $B$2:$F$2, 1, 0) = B$2, $G3, IF(HLOOKUP($K3, $B$2:$F$2, 1, 0) > B$2, C3-1, "—")))

    I need to nest another IF() function inside these so that all cells to the left of the cell with "1" show "0" instead of negative numbers, like this:

    Right.jpg

    I can' figure out the logic on these IF() functions - they are way over my head.
    Please, help.

    PR

  2. #2
    Registered User
    Join Date
    10-10-2016
    Location
    Coimbra, Portugal
    MS-Off Ver
    2016
    Posts
    86

    Re: nesting an IF() function inside an already complex multiple IF() function

    Hi.

    I have this scenario:

    Wrong.jpg

    E3: =IF($K3="—", F3-1, IF(HLOOKUP($K3, $B$2:$F$2, 1, 0) = E$2, $G3, IF(HLOOKUP($K3, $B$2:$F$2, 1, 0) > E$2, F3-1, "—")))
    D3: =IF($K3="—", E3-1, IF(HLOOKUP($K3, $B$2:$F$2, 1, 0) = D$2, $G3, IF(HLOOKUP($K3, $B$2:$F$2, 1, 0) > D$2, E3-1, "—")))
    C2: =IF($K3="—", D3-1, IF(HLOOKUP($K3, $B$2:$F$2, 1, 0) = C$2, $G3, IF(HLOOKUP($K3, $B$2:$F$2, 1, 0) > C$2, D3-1, "—")))
    B3: =IF($K3="—", C3-1, IF(HLOOKUP($K3, $B$2:$F$2, 1, 0) = B$2, $G3, IF(HLOOKUP($K3, $B$2:$F$2, 1, 0) > B$2, C3-1, "—")))

    I need to nest another IF() function inside these so that all cells to the left of the cell with "1" show "0" instead of negative numbers, like this:
    Right.jpg

    I can' figure out the logic on these IF() functions - they are way over my head.
    Please, help.

    PR
    Attached Files Attached Files

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,890

    Re: nesting an IF() function inside an already complex multiple IF() function

    Welcome to the Forum, unfortunately this is a duplicate post and as such will now be closed, you may continue in your other thread.

    Thread Closed.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

Closed Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Nesting IF & Lookup function to retrieve multiple values
    By agroeneveld in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-13-2017, 01:22 PM
  2. Nesting and Index and Match function inside an IF function
    By breckleeb in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-29-2016, 11:06 AM
  3. Calling function inside function. (aka nested function)
    By jakopak in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 11-02-2015, 05:58 AM
  4. Help nesting an OR function inside a SUMIFS function
    By wes228 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-21-2014, 06:22 PM
  5. [SOLVED] Problems with multiple matches inside an index-function
    By Sidehosw in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-14-2014, 07:53 AM
  6. Need help nesting an index/match function within a Vlookup function.
    By Christopher135 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-04-2013, 06:16 PM
  7. [SOLVED] Nesting Networkdays function inside and If function
    By Addison in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-13-2006, 03:10 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