+ Reply to Thread
Results 1 to 2 of 2

Maxed Nested If's and I need moreeeee..

  1. #1
    Registered User
    Join Date
    03-11-2013
    Location
    Manila, Philippines
    MS-Off Ver
    Excel 2007
    Posts
    6

    Maxed Nested If's and I need moreeeee..

    =IF(M2="", "-", IF($G:$G="Guadalajara", IF(AND(M2>=62,Q2>=53), "1", "0"), IF($G:$G="Iloilo", IF(AND(M2>=60,Q2>=75), "1", "0"), IF($G:$G="Pampanga", IF(AND(M2>=65,Q2>=75), "1", "0"), IF($G:$G="Pioneer", IF(AND(M2>=60,Q2>=75), "1", "0"), IF($G:$G="Santa Rosa", IF(AND(M2>=65,Q2>=75), "1", "0"), IF($G:$G="Guadalajara", IF(AND(M2>=62,Q2=""), "-", "0"), IF($G:$G="Iloilo", IF(AND(M2>=60,Q2=""), "-", "0"), IF($G:$G="Pampanga", IF(AND(M2>=65,Q2=""), "-", "0"), IF($G:$G="Pioneer", IF(AND(M2>=60,Q2=""), "-", "0"), IF($G:$G="Santa Rosa", IF(AND(M2>=65,Q2=""), "-", "0"))))))))))))

    There are a bunch of conditions for this one and I need almost 10 nested ifs. I realized when I entered this formula, there's a max.

    The conditions are

    if M2 is blank = "-"
    if M2 is available but greater than or equal to (a certain threshold) and Q2 is blank = "-"
    if M2 is available but less than (a certain threshold) and Q2 is blank = "0"

    The $G:$G is the target location:

    If site = “Guadalajara”
    If M2 is g/e 62 but Q2 is less than 53 = 0 (and vice versa)
    If M2 is g/e 62 and Q2 is g/e 53 = 1

    If site = “Iloilo”
    If M2 is g/e 60 but Q2 is less than 75 = 0 (and vice versa)
    If M2 is g/e 60 and Q2 is g/e 75 = 1

    If site = “Pampanga”
    If M2 is g/e 65 but Q2 is less than 75 = 0 (and vice versa)
    If M2 is g/e 65 and Q2 is g/e 75 = 1

    If site = “Pioneer”
    If M2 is g/e 60 but Q2 is less than 75 = 0 (and vice versa)
    If M2 is g/e 60 and Q2 is g/e 75 = 1

    If site = “Santa Rosa”
    If M2 is g/e 65 but Q2 is less than 75 = 0 (and vice versa)
    If M2 is g/e 65 and Q2 is g/e 75 = 1

    (not actual code but logic)

    How can I simplify it? I tried reversing it but it's giving me an error message.

    Thanks!

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Maxed Nested If's and I need moreeeee..

    Attach a sample workbook. Make sure there is just enough data to make it clear what is needed. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are demonstrated, mock them up manually if needed. Remember to desensitize the data.

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

+ 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. Replies: 0
    Last Post: 10-01-2012, 05:54 AM
  2. 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
  3. 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
  4. Replies: 6
    Last Post: 01-14-2009, 06:59 PM
  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