Can anyone assist with unpuzzling what I did wrong with this formula? I am still learning how to create MATCH and INDEX formulas. Because of the vast amount of information in the file I would prefer not sharing the cleaned file because of how long it would take to scrub it clean. If I must, I must, however it wouldn't be until much later in the day.
Backstory: Table2 (an Excel formatted table) is a job tracker spreadsheet that uses thousands of rows. The column headings that are relevant are "Complete" which has either "Y" or "N". "ENGST" which has either "YES" or is blank. "Sent to Engineer" which either has a date formatted as mm/dd/yy or is blank. "Line #" which has job numbers in it. Line # can have the same job number in it multiple times.
On a separate tab named "OUTSTANDING" is a list beginning in column H2 that is generated with what I call a SPILL or FILTER formula that pulls a list of numbers fed from Table2 that meets certain criteria and can change throughout the day. In column J of the OUTSTANDING tab I am trying to create a formula that looks at the number in H2 and searches Table2 for the same number and "Complete" must be "Y", "ENGST" must be "YES", "Sent to Engineer" must have a date in it. If all of these criteria are met, the formula should display whatever date is in the "Sent to Engineer" column. If the criteria is not met the formula should display "NOT SENT".
Here is the formula currently in J2 which only returns a blank cell when it should return the associated date from the "Sent to Engineer" column.
Backstory: Table2 (an Excel formatted table) is a job tracker spreadsheet that uses thousands of rows. The column headings that are relevant are "Complete" which has either "Y" or "N". "ENGST" which has either "YES" or is blank. "Sent to Engineer" which either has a date formatted as mm/dd/yy or is blank. "Line #" which has job numbers in it. Line # can have the same job number in it multiple times.
On a separate tab named "OUTSTANDING" is a list beginning in column H2 that is generated with what I call a SPILL or FILTER formula that pulls a list of numbers fed from Table2 that meets certain criteria and can change throughout the day. In column J of the OUTSTANDING tab I am trying to create a formula that looks at the number in H2 and searches Table2 for the same number and "Complete" must be "Y", "ENGST" must be "YES", "Sent to Engineer" must have a date in it. If all of these criteria are met, the formula should display whatever date is in the "Sent to Engineer" column. If the criteria is not met the formula should display "NOT SENT".
Here is the formula currently in J2 which only returns a blank cell when it should return the associated date from the "Sent to Engineer" column.
VBA Code:
=IF(AND(INDEX(Table2[Complete],MATCH(OUTSTANDING!H2,Table2[Line '#],0))="Y",INDEX(Table2[ENGST],MATCH(OUTSTANDING!H2,Table2[Line '#],0))="YES",NOT(ISBLANK(INDEX(Table2[Sent to Engineer],MATCH(OUTSTANDING!H2,Table2[Line '#],0))))),INDEX(Table2[Sent to Engineer],MATCH(OUTSTANDING!H2,Table2[Line '#],0)),"NOT SENT")