+ Reply to Thread
Results 1 to 9 of 9

Help with IF formula

  1. #1
    Registered User
    Join Date
    02-11-2015
    Location
    Lebanon, Ohio
    MS-Off Ver
    2010
    Posts
    5

    Help with IF formula

    I am using the following formula to but am having a problem if the value is equal to the value in the first line of the formula no problem. If it is the second value 17 lines down I get a FALSE. I am sure it is something obvious but not certain as to how to get this work. Looking for suggestions and ideas. Thanks

    =IF(BJ2="1-02-0001-001",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Air","Air",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Ocean","Ocean",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Air_Ocean","Air_Ocean",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Land_Transport","Land_Transport",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Logistics_SCM","Logistics_SCM",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Customs","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Finance_Controlling","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="General_Management","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Human_Resources","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="ICT","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Legal_Affairs","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Marketing_PR","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Procurement","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Quality_Processes","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Sales","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Specials","Unassigned",
    IF(BJ2="1-02-0001-003",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Air","Air",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Air_Ocean","Air_Ocean",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Ocean","Ocean",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Land_Transport","Land_Transport",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Logistics_SCM","Logistics_SCM",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Customs","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Finance_Controlling","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="General_Management","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Human_Resources","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="ICT","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Legal_Affairs","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Marketing_PR","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Procurement","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Quality_Processes","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Sales","Unassigned",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Specials","Unassigned",
    "Unassigned"))))))))))))))))))))))))))))))))))New User Workbook_2015.zip
    Last edited by Gseft; 02-11-2015 at 12:25 PM. Reason: add attachment

  2. #2
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Help with IF formula

    I admire you on your diligence to put together such a ridiculous IF formula, but this is a nightmare. This can definitely be simplified. Can you provide a sample workbook?
    Spread the love, add to the Rep

    "None of us are as smart as all of us."

  3. #3
    Registered User
    Join Date
    02-11-2015
    Location
    Lebanon, Ohio
    MS-Off Ver
    2010
    Posts
    5

    Re: Help with IF formula

    Had to zip up the file but it is now here.

  4. #4
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Help with IF formula

    So i was able to open the file, but where is your current formula being applied?

  5. #5
    Registered User
    Join Date
    02-11-2015
    Location
    Lebanon, Ohio
    MS-Off Ver
    2010
    Posts
    5

    Re: Help with IF formula

    Yes, Sorry about that. It is in Column Y of the LMS Upload spreadsheet. There is also a similar version in Column Z. Also in the TMPUpload spreadsheet in columns Y & Z.

  6. #6
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Help with IF formula

    UPDATE: Looks like my syntax is wrong, I should probably have more "Unassigned"s but you should be able to base something on this.

    Can't this simply be shortened to:

    =IF(BJ2="1-02-0001-001",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Air","Air",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Ocean","Ocean",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Air_Ocean","Air_Ocean",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Land_Transport","Land_Transport",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:D,3,FALSE)="Logistics_SCM","Logistics_SCM",
    IF(BJ2="1-02-0001-003",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Air","Air",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Air_Ocean","Air_Ocean",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Ocean","Ocean",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Land_Transport","Land_Transport",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Logistics_SCM","Logistics_SCM",
    IF(VLOOKUP(Q2,'Job Code w Training Info'!B:J,9,FALSE)="Customs","Unassigned")))))))))))))

    since only the first 5 IFs in each BJ2 IF provide any data otherwise the result is "Unassigned"

    FYI: Once you start creating more than about 6 compound IFs you should really be looking at creating a table and using VLOOKUP
    Last edited by Special-K; 02-11-2015 at 01:19 PM.
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  7. #7
    Registered User
    Join Date
    02-11-2015
    Location
    Lebanon, Ohio
    MS-Off Ver
    2010
    Posts
    5

    Re: Help with IF formula

    Thanks, that was how my original formula was written but was still having the same problem. I would get the desired result as long as the value=1-02-0001-001 but would receive a FALSE if value was 1-02-0001-003.

  8. #8
    Forum Expert
    Join Date
    09-11-2014
    Location
    Washington, DC
    MS-Off Ver
    2016
    Posts
    1,907

    Re: Help with IF formula

    This formula should do the same thing that your current nested IF formula is doing (pasted into Y2 of LMS Upload):

    Please Login or Register  to view this content.
    The problem seems to be that column O of your Hires sheet is currently not pulling data correctly from a source on your network drive.

  9. #9
    Registered User
    Join Date
    02-11-2015
    Location
    Lebanon, Ohio
    MS-Off Ver
    2010
    Posts
    5

    Re: Help with IF formula

    Thanks I will give that a try, and check out what is going on in the Hires sheet. Thanks again for the guidance.

+ 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: 11
    Last Post: 06-06-2014, 03:34 PM
  2. how to hide formula in formula box, view lookup result in formula box?
    By vengatvj in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-14-2013, 04:06 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