Trouble with Vlookup formula for multiple criteria on different sheets.

robgoldstein

Board Regular
Joined
Oct 26, 2013
Messages
165
Office Version
  1. 2019
Platform
  1. Windows
HI All
I am having a problem with my vlookup formula.
I am trying to find the the info in column X in my "data" sheet for rows where the Date (cell A1) and email (Column B) from "team" sheet match the date in my "Data" sheet in column C and the email in column B on the DATA sheet

Here is formula I am using, but I am getting an error.
=VLOOKUP($b3&"|"$a$1,choose({1,2},DATA!B:B&"|"&DATA!C:C,DATA!X:X),2,0)}

Any help is greatly appreciated.

tp covid screener (1).xlsx
ABCDEFGHIJKLMNOPQRS
1TimestampEmail addressEvent DateParent/Guardian filling out this form, please enter your full name below: Please enter your participants nameDo you have a fever? Do you have a cough?Do you have difficulty breathing? Do you have a sore throat or trouble swallowing? Do you have a runny nose or red eyes? Have you lost taste or smell? Have you experience sore muscles or feeling unwell? Do you have nausea, vomiting or diarrhea? Have you been in close contact with someone who has been sick or has confirmed case of Covid-19 in the past 14 days? *Have you returned from travel outside of Canada in the last 14 days? TORONTO.CA/COVID19 Do you have any of the following: If you answered YES to any of these questions, go home & self-isolate right away. Call Telehealth or your health care provider, to find out if you need a test. *I verify that I have not answered Yes to any of the above questions
27-4-2021 11:06:01rob@gmail.com2021-07-04rob goldsteinalex goldsteinNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questions
37-4-2021 11:28:17rob@gmail.com2021-07-04test dadtest kidNoNoYesNoNoNoNoNoNoNoI have read the city of Toronto NoticeI have answered YES, and will not attend baseball activities today
47-4-2021 13:55:51Ginney@hogwarts.com2021-07-04rob GdumbassNoNoNoNoNoNoYesNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questions
57-4-2021 15:49:07rob@gmail.com2021-07-04rob gAlex GNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questions
67-4-2021 22:59:35ralf@machio.com2021-07-05Ralf Machio SRRalf Machio Jr. NoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI have answered YES, and will not attend baseball activities today
77-4-2021 23:06:26RalfMachio@gmail.com2021-07-04RAlf SRRalf JrNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questions
87-4-2021 23:22:24HarryPotter@hogwarts.com2021-07-04Dumble DoorHarry PNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questions
Form responses 1


tp covid screener (1).xlsx
ABCD
12021-07-08Cleared email 1
2PlayerEmailEmail 2
3Alexrob@gmail.comJen@gmail.com#ERROR!
4Daverob@gmail.comJodi@gmail.com
5Jenrob@gmail.comdave@gmail.com
6Steverob@gmail.com
7Rickralf@machio.comsteve@gmail.com
8Ralf JrRalfMachio@gmail.comMsExel@gmail.com
9Ron WHarryPotter@hogwarts.comGinney@hogwarts.com
Team 1
Cell Formulas
RangeFormula
A1A1=TODAY()
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Hi Robgoldstein,

You didn't show column X so I've dummied up some values. I've also changed some Event Dates so some will match. You don't say what should happen if no match is found so I've returned "No match".

Here your data sheet
 
Upvote 0
Whoops post too early

Here's your data sheet

RobGoldstein2.xlsx
ABCDEFGHIJKLMNOPQRX
1TimestampEmail addressEvent DateParent/Guardian filling out this form, please enter your full name below: Please enter your participants nameDo you have a fever? Do you have a cough?Do you have difficulty breathing? Do you have a sore throat or trouble swallowing? Do you have a runny nose or red eyes? Have you lost taste or smell? Have you experience sore muscles or feeling unwell? Do you have nausea, vomiting or diarrhea? Have you been in close contact with someone who has been sick or has confirmed case of Covid-19 in the past 14 days? *Have you returned from travel outside of Canada in the last 14 days? TORONTO.CA/COVID19 Do you have any of the following: If you answered YES to any of these questions, go home & self-isolate right away. Call Telehealth or your health care provider, to find out if you need a test. *I verify that I have not answered Yes to any of the above questions X
27-4-2021 11:06:01rob@gmail.com2021-07-04rob goldsteinalex goldsteinNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsMole
37-4-2021 11:28:17rob@gmail.com2021-07-08test dadtest kidNoNoYesNoNoNoNoNoNoNoI have read the city of Toronto NoticeI have answered YES, and will not attend baseball activities todayDog
47-4-2021 13:55:51Ginney@hogwarts.com2021-07-08rob GdumbassNoNoNoNoNoNoYesNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsCat
57-4-2021 15:49:07rob@gmail.com2021-07-04rob gAlex GNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsGoat
67-4-2021 22:59:35ralf@machio.com2021-07-08Ralf Machio SRRalf Machio Jr. NoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI have answered YES, and will not attend baseball activities todaySheep
77-4-2021 23:06:26RalfMachio@gmail.com2021-07-04RAlf SRRalf JrNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsHorse
87-4-2021 23:22:24HarryPotter@hogwarts.com2021-07-08Dumble DoorHarry PNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsCow
Form Responses 1


Here's the Team sheet

RobGoldstein2.xlsx
ABCD
17/8/2021Cleared email 1
2PlayerEmailEmail 2
3Alexrob@gmail.comJen@gmail.comDog
4Daverob@gmail.comJodi@gmail.comDog
5Jenrob@gmail.comdave@gmail.comDog
6Steverob@gmail.comDog
7Rickralf@machio.comsteve@gmail.comSheep
8Ralf JrRalfMachio@gmail.comMsExel@gmail.comNo match
9Ron WHarryPotter@hogwarts.comGinney@hogwarts.comCow
Team 1
Cell Formulas
RangeFormula
A1A1=TODAY()
D3:D9D3=IFERROR(INDEX('Form Responses 1'!$X$2:$X$9999,MATCH(1,INDEX(('Form Responses 1'!$C$2:$C$9999=$A$1)*('Form Responses 1'!$B$2:$B$9999=B3),0,1),0)),"No match")
 
Upvote 0
Whoops post too early

Here's your data sheet

RobGoldstein2.xlsx
ABCDEFGHIJKLMNOPQRX
1TimestampEmail addressEvent DateParent/Guardian filling out this form, please enter your full name below: Please enter your participants nameDo you have a fever? Do you have a cough?Do you have difficulty breathing? Do you have a sore throat or trouble swallowing? Do you have a runny nose or red eyes? Have you lost taste or smell? Have you experience sore muscles or feeling unwell? Do you have nausea, vomiting or diarrhea? Have you been in close contact with someone who has been sick or has confirmed case of Covid-19 in the past 14 days? *Have you returned from travel outside of Canada in the last 14 days? TORONTO.CA/COVID19 Do you have any of the following: If you answered YES to any of these questions, go home & self-isolate right away. Call Telehealth or your health care provider, to find out if you need a test. *I verify that I have not answered Yes to any of the above questions X
27-4-2021 11:06:01rob@gmail.com2021-07-04rob goldsteinalex goldsteinNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsMole
37-4-2021 11:28:17rob@gmail.com2021-07-08test dadtest kidNoNoYesNoNoNoNoNoNoNoI have read the city of Toronto NoticeI have answered YES, and will not attend baseball activities todayDog
47-4-2021 13:55:51Ginney@hogwarts.com2021-07-08rob GdumbassNoNoNoNoNoNoYesNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsCat
57-4-2021 15:49:07rob@gmail.com2021-07-04rob gAlex GNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsGoat
67-4-2021 22:59:35ralf@machio.com2021-07-08Ralf Machio SRRalf Machio Jr. NoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI have answered YES, and will not attend baseball activities todaySheep
77-4-2021 23:06:26RalfMachio@gmail.com2021-07-04RAlf SRRalf JrNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsHorse
87-4-2021 23:22:24HarryPotter@hogwarts.com2021-07-08Dumble DoorHarry PNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsCow
Form Responses 1


Here's the Team sheet

RobGoldstein2.xlsx
ABCD
17/8/2021Cleared email 1
2PlayerEmailEmail 2
3Alexrob@gmail.comJen@gmail.comDog
4Daverob@gmail.comJodi@gmail.comDog
5Jenrob@gmail.comdave@gmail.comDog
6Steverob@gmail.comDog
7Rickralf@machio.comsteve@gmail.comSheep
8Ralf JrRalfMachio@gmail.comMsExel@gmail.comNo match
9Ron WHarryPotter@hogwarts.comGinney@hogwarts.comCow
Team 1
Cell Formulas
RangeFormula
A1A1=TODAY()
D3:D9D3=IFERROR(INDEX('Form Responses 1'!$X$2:$X$9999,MATCH(1,INDEX(('Form Responses 1'!$C$2:$C$9999=$A$1)*('Form Responses 1'!$B$2:$B$9999=B3),0,1),0)),"No match")
thanks so much. The date is the event date in column C on the data page. If there are no matches I would like it to say "not eligible"
.
 
Upvote 0
Whoops post too early

Here's your data sheet

RobGoldstein2.xlsx
ABCDEFGHIJKLMNOPQRX
1TimestampEmail addressEvent DateParent/Guardian filling out this form, please enter your full name below: Please enter your participants nameDo you have a fever? Do you have a cough?Do you have difficulty breathing? Do you have a sore throat or trouble swallowing? Do you have a runny nose or red eyes? Have you lost taste or smell? Have you experience sore muscles or feeling unwell? Do you have nausea, vomiting or diarrhea? Have you been in close contact with someone who has been sick or has confirmed case of Covid-19 in the past 14 days? *Have you returned from travel outside of Canada in the last 14 days? TORONTO.CA/COVID19 Do you have any of the following: If you answered YES to any of these questions, go home & self-isolate right away. Call Telehealth or your health care provider, to find out if you need a test. *I verify that I have not answered Yes to any of the above questions X
27-4-2021 11:06:01rob@gmail.com2021-07-04rob goldsteinalex goldsteinNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsMole
37-4-2021 11:28:17rob@gmail.com2021-07-08test dadtest kidNoNoYesNoNoNoNoNoNoNoI have read the city of Toronto NoticeI have answered YES, and will not attend baseball activities todayDog
47-4-2021 13:55:51Ginney@hogwarts.com2021-07-08rob GdumbassNoNoNoNoNoNoYesNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsCat
57-4-2021 15:49:07rob@gmail.com2021-07-04rob gAlex GNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsGoat
67-4-2021 22:59:35ralf@machio.com2021-07-08Ralf Machio SRRalf Machio Jr. NoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI have answered YES, and will not attend baseball activities todaySheep
77-4-2021 23:06:26RalfMachio@gmail.com2021-07-04RAlf SRRalf JrNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsHorse
87-4-2021 23:22:24HarryPotter@hogwarts.com2021-07-08Dumble DoorHarry PNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsCow
Form Responses 1


Here's the Team sheet

RobGoldstein2.xlsx
ABCD
17/8/2021Cleared email 1
2PlayerEmailEmail 2
3Alexrob@gmail.comJen@gmail.comDog
4Daverob@gmail.comJodi@gmail.comDog
5Jenrob@gmail.comdave@gmail.comDog
6Steverob@gmail.comDog
7Rickralf@machio.comsteve@gmail.comSheep
8Ralf JrRalfMachio@gmail.comMsExel@gmail.comNo match
9Ron WHarryPotter@hogwarts.comGinney@hogwarts.comCow
Team 1
Cell Formulas
RangeFormula
A1A1=TODAY()
D3:D9D3=IFERROR(INDEX('Form Responses 1'!$X$2:$X$9999,MATCH(1,INDEX(('Form Responses 1'!$C$2:$C$9999=$A$1)*('Form Responses 1'!$B$2:$B$9999=B3),0,1),0)),"No match")
@Toadstool Thanks so much, but this is not 100% what I am looking for.
If there is a row that has the email and the right date, I need it to pull the info from column X. If there isn't a row with both of those matching I need it to be blank. Sorry for the confusion.
 
Upvote 0
@Toadstool Thanks so much, but this is not 100% what I am looking for.
If there is a row that has the email and the right date, I need it to pull the info from column X. If there isn't a row with both of those matching I need it to be blank. Sorry for the confusion.
Yes, it's checking for the same row that the Event date in column C matches the Team sheet date in cell A1 and that the Email address in column B of Team Responses1 matches the Team sheet email address in column B.

If it doesn't find a match for either then you can just change the IFERROR response from "No match" to null, like this:
Excel Formula:
=IFERROR(INDEX('Form Responses 1'!$X$2:$X$9999,MATCH(1,INDEX(('Form Responses 1'!$C$2:$C$9999=$A$1)*('Form Responses 1'!$B$2:$B$9999=B3),0,1),0)),"")

NOTE: If there are multiple matches then it will only return the Remarks in column X from the first match.
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

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