Nested If Statements Based on Year

tycasey17

Board Regular
Joined
Sep 26, 2013
Messages
93
Office Version
  1. 2019
  2. 2016
Platform
  1. Windows
- On Sheet 1 (FEED-2) I have the fiscal year (B5) with other information not applicable to this question it is just a what I call a feeder page. To get the fiscal year I have a table I created that is based off of the date to get the year, I tried just typing 2019 and still the same result.



- On Sheet 2 (UNIT) I have where the main arguments being made, I have inventories that need to be completed monthly and I am trying to make it feed me the information by the year. I tried using nested IF statements for each year and then start the next argument based on what the status of the inventory from Sheet 3. I have 6 nested for each year with different VLOOKUP locations based on the year. When I told it to feed from the 2019 it gives me a blank response.

FORMULA:
=UPPER(IFERROR(
IF('FEED-2'!$B$5="2019",
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,4,FALSE)="","Awaiting inventory documents for "&TEXT(MONTH('FEED-2'!$I$5),"MMMM"),
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,4,FALSE)="NI","Awaiting inventory documents for "&TEXT(MONTH('FEED-2'!$I$5),"MMMM"),
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,4,FALSE)="IP","Inventory IN PROGRESS",
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,4,FALSE)="CS","Inventory has been completed but is awaiting the Commander's Signature",
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,4,FALSE)="CP","Inventory completed by "&VLOOKUP('FEED-2'!$I$5,_INVtab,2,FALSE)&" on "&TEXT(VLOOKUP(VLOOKUP('FEED-2'!$I$5,_INVtab,3,FALSE),_JCDate2,3,FALSE),"MMMM D, YYYY"),
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,4,FALSE)="CL","Inventory completed late by "&VLOOKUP('FEED-2'!$I$5,_INVtab,2,FALSE)&" on "&TEXT(VLOOKUP(VLOOKUP('FEED-2'!$I$5,_INVtab,3,FALSE),_JCDate2,3,FALSE),"MMMM D, YYYY"))))))),
IF('FEED-2'!$B$5="2020",
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,8,FALSE)="","Awaiting inventory documents for "&TEXT(MONTH('FEED-2'!$I$5),"MMMM"),
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,8,FALSE)="NI","Awaiting inventory documents for "&TEXT(MONTH('FEED-2'!$I$5),"MMMM"),
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,8,FALSE)="IP","Inventory IN PROGRESS",
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,8,FALSE)="CS","Inventory has been completed but is awaiting the Commander's Signature",
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,8,FALSE)="CP","Inventory completed by "&VLOOKUP('FEED-2'!$I$5,_INVtab,6,FALSE)&" on "&TEXT(VLOOKUP(VLOOKUP('FEED-2'!$I$5,_INVtab,7,FALSE),_JCDate2,3,FALSE),"MMMM D, YYYY"),
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,8,FALSE)="CL","Inventory completed late by "&VLOOKUP('FEED-2'!$I$5,_INVtab,6,FALSE)&" on "&TEXT(VLOOKUP(VLOOKUP('FEED-2'!$I$5,_INVtab,7,FALSE),_JCDate2,3,FALSE),"MMMM D, YYYY"))))))),
IF('FEED-2'!$B$5="2021",
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,12,FALSE)="","Awaiting inventory documents for "&TEXT(MONTH('FEED-2'!$I$5),"MMMM"),
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,12,FALSE)="NI","Awaiting inventory documents for "&TEXT(MONTH('FEED-2'!$I$5),"MMMM"),
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,12,FALSE)="IP","Inventory IN PROGRESS",
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,12,FALSE)="CS","Inventory has been completed but is awaiting the Commander's Signature",
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,12,FALSE)="CP","Inventory completed by "&VLOOKUP('FEED-2'!$I$5,_INVtab,10,FALSE)&" on "&TEXT(VLOOKUP(VLOOKUP('FEED-2'!$I$5,_INVtab,11,FALSE),_JCDate2,3,FALSE),"MMMM D, YYYY"),
IF(VLOOKUP('FEED-2'!$I$5,_INVtab,12,FALSE)="CL","Inventory completed late by "&VLOOKUP('FEED-2'!$I$5,_INVtab,10,FALSE)&" on "&TEXT(VLOOKUP(VLOOKUP('FEED-2'!$I$5,_INVtab,11,FALSE),_JCDate2,3,FALSE),"MMMM D, YYYY"))))))),"CHECK INVENTORY TAB (NESTED)"))),"CHECK INVENTORY TAB (IF ERROR)"))



- On Sheet 3 (INV-A) I have the raw data coming from to fill into Sheet 2 using a defined name of "

2019
Name is column for name is 2, Date is 3, Status is 4

2020
Name is column for name is 6, Date is 7, Status is 8

2021
Name is column for name is 10, Date is 11, Status is 12

* If there wasn't so much to try and put on here I would give you a better table to understand
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,224,820
Messages
6,181,162
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top