+ Reply to Thread
Results 1 to 6 of 6

Need help with nested IF?

  1. #1
    Registered User
    Join Date
    07-13-2014
    Location
    Columbus
    MS-Off Ver
    2007
    Posts
    3

    Need help with nested IF?

    I am working on a formula that does an INDEX and Match depending on whether a cell is "M" or "F".

    The following is what I have currently:

    =IF(E2="M",(INDEX('Screening Table Weight'!$A$5:$F$28,MATCH(ROUND(H2,0),'Screening Table Weight'!$A$5:$A$28,0),MATCH(G2,'Screening Table Weight'!$A$5:$F$5,1))),IF(E2="F",(INDEX('Screening Table Weight'!$G$5:$K$28,MATCH(ROUND(H2,0),'Screening Table Weight'!$G$5:$K$28,0),MATCH(G2,'Screening Table Weight'!$G$5:$K$5,1)))))

    The first criteria, "M" is referencing and working correctly. The "F" is not working correctly. I think that perhaps I should not be using a nested IF, but I do not know what to do from here, or what it should look like. If someone could please offer guidance on this, I would greatly appreciate it.

  2. #2
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Re: Need help with nested IF?

    Try this,
    I have corrected this...
    if it is not the solution.. then provide a non-sensitive workbook...

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


    Say thanks, click *

  3. #3
    Forum Expert Vikas_Gautam's Avatar
    Join Date
    06-04-2013
    Location
    Ludhiana,Punjab, India
    MS-Off Ver
    Excel 2013
    Posts
    1,850

    Thumbs up Re: Need help with nested IF?

    Try this,
    I have corrected this...
    if it is not the solution.. then provide a non-sensitive workbook...

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


    Say thanks, click *

  4. #4
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Need help with nested IF?

    Hi,

    Perhaps

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  5. #5
    Registered User
    Join Date
    07-13-2014
    Location
    Columbus
    MS-Off Ver
    2007
    Posts
    3

    Re: Need help with nested IF?

    The formula, as it was previously entered, works for the "M" but not for the "F". Both solutions Vikas and Richard,also worked for the "M", but not for the "F".

  6. #6
    Registered User
    Join Date
    07-13-2014
    Location
    Columbus
    MS-Off Ver
    2007
    Posts
    3

    Re: Need help with nested IF?

    Disregard. I figured it out. I was referencing the second set incorrectly.

    =IF(E3="M",(INDEX('Screening Table Weight'!$A$5:$F$28,MATCH(ROUND(H3,0),'Screening Table Weight'!$A$5:$A$28,0),MATCH(G3,'Screening Table Weight'!$A$5:$F$5,1))),IF(E3="F",(INDEX('Screening Table Weight'!$G$5:$K$28,MATCH(ROUND(H3,0),'Screening Table Weight'!$G$5:$G$28,0),MATCH(G3,'Screening Table Weight'!$G$5:$K$5,1)))))it out. Correction below:
    Attached Files Attached Files
    Last edited by Spain412; 07-13-2014 at 08:55 AM. Reason: un-needed

+ 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. How to reduces Nested IF code(144 Nested IF) to achive same functionality
    By jobseeker in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-09-2014, 09:45 AM
  2. Replies: 0
    Last Post: 10-01-2012, 05:54 AM
  3. Next without For error in nested loop - Escaping a Nested Loop?
    By BeneRich in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-10-2012, 06:38 PM
  4. For each loop nested; getting stuck on one cell in first iteration of nested loop
    By Excel_vba in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-22-2009, 11:54 AM
  5. help on a nested countif/nested if formula
    By vickiemc in forum Excel General
    Replies: 2
    Last Post: 08-13-2008, 08:29 AM

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