Search for 1 of 2 inputs and 3rd

robgoldstein

Board Regular
Joined
Oct 26, 2013
Messages
165
Office Version
  1. 2019
Platform
  1. Windows
Hey All,
I have a sheet that has 2 columns of email addresses and a cell for today's date. I need to search a sheet named "data" for rows that contain one of those email addresses and today's date. If there is a match I need to pull the info from cell X.
Is there a formula that can do this in a single step?
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
I think it would be helpful to see what your main sheet and your "data" sheet look like, so we know how everything is structured.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
 
Upvote 0
I think it would be helpful to see what your main sheet and your "data" sheet look like, so we know how everything is structured.

MrExcel has a tool called “XL2BB” that lets you post samples of your data that will allow us to copy/paste it to our Excel spreadsheets, so we can work with the same copy of data that you are. Instructions on using this tool can be found here: XL2BB Add-in

Note that there is also a "Test Here” forum on this board. This is a place where you can test using this tool (or any other posting techniques that you want to test) before trying to use those tools in your actual posts.
Here is the "data" sheet.
The info is coming from a google form. We are using the event date, and email address to return the result in column X which shows if they are cleared to play

tp covid screener.xlsx
ABCDEFGHIJKLMNOPQRSTUVWX
1TimestampEmailEvent 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 Check box combined answerCleared to play on check boxesTotal number of No's Cleared to play on answerscombined answersCLEARED TO PLAY
2#############rob@gmail.com2021-07-04rob goldsteinalex goldsteinNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsTRUE10TRUETRUETRUETRUE
3#############rob@gmail.com2021-07-04test dadtest kidNoNoYesNoNoNoNoNoNoNoI have read the city of Toronto NoticeI have answered YES, and will not attend baseball activities todayI have read the city of Toronto NoticeI have answered YES, and will not attend baseball activities todayFALSE9FALSEFALSEFALSEFALSE
4#############Ginney@hogwarts.com2021-07-04rob GdumbassNoNoNoNoNoNoYesNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsTRUE9FALSETRUEFALSEFALSE
5#############rob@gmail.com2021-07-04rob gAlex GNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsTRUE10TRUETRUETRUETRUE
6#############ralf@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 todayI have read the city of Toronto NoticeI have answered YES, and will not attend baseball activities todayFALSE10TRUEFALSETRUEFALSE
7#############RalfMachio@gmail.com2021-07-04RAlf SRRalf JrNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsTRUE10TRUETRUETRUETRUE
8#############HarryPotter@hogwarts.com2021-07-04Dumble DoorHarry PNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsTRUE10TRUETRUETRUETRUE
90000000000000000000FALSE0FALSEFALSEFALSEFALSE
DATA
Cell Formulas
RangeFormula
A2:Q9A2='Form responses 1'!A2
S2:S9S2=P2&Q2
T2:T9T2=ISNUMBER(SEARCH("I have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questions",S2))
U2:U9U2=COUNTIFS(F2:O2,"no")
V2:V9V2=ISNUMBER(SEARCH("10",U2))
W2:W9W2=T2&V2
X2:X9X2=ISNUMBER(SEARCH("TRUETRUE",W2))
 
Last edited:
Upvote 0
Thanks @Joe4 I am trying to use Vlookup, but having trouble with the 2 criteria.
Here is the formula I am using, =VLOOKUP($b3&"|"$a$1,choose({1,2},DATA!B:B&"|"&DATA!C:C,DATA!X:X),2,0)}
 
Upvote 0
If you still have any issues, please post how your data on your other sheets looks.
I meant post a screen print of the other sheet, like you did for the Data sheet.
 
Upvote 0
tp covid screener (1).xlsx
ABCD
12021-07-042021-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
B1B1=TODAY()



tp covid screener (1).xlsx
ABCDEFGHIJKLMNOPQRSTUVWXY
1TimestampEmailEvent 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 date|emailCheck box combined answerCleared to play on check boxesTotal number of No's Cleared to play on answerscombined answersCLEARED TO PLAY
2#############rob@gmail.com2021-07-04rob goldsteinalex goldsteinNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsTRUE10TRUETRUETRUETRUE
3#############rob@gmail.com2021-07-04test dadtest kidNoNoYesNoNoNoNoNoNoNoI have read the city of Toronto NoticeI have answered YES, and will not attend baseball activities todayI have read the city of Toronto NoticeI have answered YES, and will not attend baseball activities todayFALSE9FALSEFALSEFALSEFALSE
4#############Ginney@hogwarts.com2021-07-04rob GdumbassNoNoNoNoNoNoYesNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsTRUE9FALSETRUEFALSEFALSE
5#############rob@gmail.com2021-07-04rob gAlex GNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsTRUE10TRUETRUETRUETRUE
6#############ralf@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 todayI have read the city of Toronto NoticeI have answered YES, and will not attend baseball activities todayFALSE10TRUEFALSETRUEFALSE
7#############RalfMachio@gmail.com2021-07-04RAlf SRRalf JrNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsTRUE10TRUETRUETRUETRUE
8#############HarryPotter@hogwarts.com2021-07-04Dumble DoorHarry PNoNoNoNoNoNoNoNoNoNoI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsI have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questionsTRUE10TRUETRUETRUETRUE
90000000000000000000FALSE0FALSEFALSEFALSEFALSE
DATA
Cell Formulas
RangeFormula
A2:Q9A2='Form responses 1'!A2
S2:S9S2=P2&Q2
T2:T9T2=ISNUMBER(SEARCH("I have read the city of Toronto NoticeI acknowledge I have not answered YES to any of the above questions",S2))
U2:U9U2=COUNTIFS(F2:O2,"no")
V2:V9V2=ISNUMBER(SEARCH("10",U2))
W2:W9W2=T2&V2
X2:X9X2=ISNUMBER(SEARCH("TRUETRUE",W2))
 
Upvote 0
OK, in looking at this sheet, what details should the formula in D3 be using?
- The date from A1 or B1?
- The Email address from cell B2 or C2?

Is there any other column (other than column D) to check the other Email address?
 
Upvote 0
OK, in looking at this sheet, what details should the formula in D3 be using?
- The date from A1 or B1?
- The Email address from cell B2 or C2?

Is there any other column (other than column D) to check the other Email address?
it is using the date in B1. I have a formula in B2 that i will eventually move over, but I need the dates that already input to check it.
We need email in B2. I will then duplicate this formula for C2 and then combine the results for a final result.
 
Upvote 0
OK, use this formula for the first record (on row 3) and copy down for the rest:
Excel Formula:
=IF(COUNTIFS(Data!$B:$B,$B3,Data!$C:$C,$B$1)>0,"X","")
 
Upvote 0

Forum statistics

Threads
1,214,945
Messages
6,122,393
Members
449,081
Latest member
JAMES KECULAH

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