MATCH and INDEX help

Nanaia

Active Member
Joined
Jan 11, 2018
Messages
306
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
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.

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")
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
how about a filter formula
this brings back 3 columns
=FILTER(J2:L11,(J2:J11="Y")*(K2:K11="YES")*(L2:L11<>""),"No Match")
in A2

BUT you only what
1 column the date

as you can see in A5
=FILTER(L2:L11,(J2:J11="Y")*(K2:K11="YES")*(L2:L11<>""),"No Match")

i have simplified considerably

i'm assuming you would get multiple dates if conditions are met

=FILTER(L2:L11,(J2:J11="Y")*(K2:K11="YES")*(L2:L11<>""),"No Match")

i just used column references - so not tables

Book17
ABCDEFGHIJKLM
1completeENGSTsent to eng date
2yYes1/1/24yYes1/1/24
3n1/2/24
4y1/3/24
51/1/24nYes1/4/24
6yYes
7n
8y
9nYes
10yYes
11n
Sheet1
Cell Formulas
RangeFormula
A2:C2A2=FILTER(J2:L11,(J2:J11="Y")*(K2:K11="YES")*(L2:L11<>""),"No Match")
A5A5=FILTER(L2:L11,(J2:J11="Y")*(K2:K11="YES")*(L2:L11<>""),"No Match")
Dynamic array formulas.


IF NOT
why not give a much simpler example as i have done with expected results
 
Upvote 0
This is the section of the OUTSTANDING tab. I guess you could call it a dashboard. Column H changes frequently. In column J I want to be able to see whether or not the number listed in column H was sent out at a glance.
1714137103391.png
 
Upvote 0
ia H column a Unique entry for an employee - like an ID tag ?????

so would that appear in MY MOCK UP , in column H only once ???
if so , maybe a bit messy , and INDEX maybe a better way - BUT again will only pull back the first instance

=FILTER($L$2:$L$11,($J$2:$J$11="Y")*($K$2:$K$11="YES")*($L$2:$L$11<>"")*($H$2:$H$11=A2),"No Match")
if more then once maybe a splii error

if more then once - MAYBE a TEXTJOIN to bring back all the dates - SEE BELOW

Book19
ABCDEFGHIJKL
1OUT FOR ENGSTTO ENG?OUT FOR ENGSTcompleteENGSTsent to eng date
21234561/1/24123456yYes45292
3123407No Match123407n45293
4123358No Match123358y45294
5123309No Match123309nYes45295
6123260No Match123260yYes
71232111/1/23123211YYes1/1/23
8123162No Match123162y
9123113No Match123113nYes
10123064No Match123064yYes
11123015No Match123015n
Sheet1
Cell Formulas
RangeFormula
C2:C11C2=FILTER($L$2:$L$11,($J$2:$J$11="Y")*($K$2:$K$11="YES")*($L$2:$L$11<>"")*($H$2:$H$11=A2),"No Match")


If more than 1 entry for that ID
how about
=TEXTJOIN(" , ",,TEXT(FILTER($L$2:$L$11,($J$2:$J$11="Y")*($K$2:$K$11="YES")*($L$2:$L$11<>"")*($H$2:$H$11=A2),"No Match"),"DD/MM/YY"))

Book19
ABCDEFGHIJKL
1OUT FOR ENGSTTO ENG?OUT FOR ENGSTcompleteENGSTsent to eng date
212345601/01/24 , 26/04/24123456yYes45292
3123407No Match123407n45293
4123358No Match123358y45294
5123309No Match123309nYes45295
6123260No Match123260yYes
712321101/01/23123211YYes1/1/23
8123162No Match123162y
9123113No Match123113nYes
10123064No Match123064yYes
11123015No Match123456yyes4/26/24
Sheet1
Cell Formulas
RangeFormula
C2:C11C2=TEXTJOIN(" , ",,TEXT(FILTER($L$2:$L$11,($J$2:$J$11="Y")*($K$2:$K$11="YES")*($L$2:$L$11<>"")*($H$2:$H$11=A2),"No Match"),"DD/MM/YY"))


maybe a dropbox file helps
only on share for a few days
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,711
Messages
6,174,028
Members
452,542
Latest member
Bricklin

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