Match for two possibilities in the same column

yankat22

New Member
Joined
Aug 10, 2022
Messages
13
Office Version
  1. 2019
Platform
  1. Windows
Hi there,

I'm working on a self-scheduling sheet for a group of 30 employees and I'm trying to figure out how to match two criteria and it populate a single name (index:match type of function except you're matching for possibility of two). Example:
Everyone signs up in column B for Mondays shift and I want to search that column for either 2100B or 2100C and it populate the name that matches that specification in a single cell.

I've attached an example of the spreadsheet I'm working on. Any and all guidance is appreciated.
 

Attachments

  • Capture.PNG
    Capture.PNG
    14 KB · Views: 18

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
Hi there,

I'm working on a self-scheduling sheet for a group of 30 employees and I'm trying to figure out how to match two criteria and it populate a single name (index:match type of function except you're matching for possibility of two). Example:
Everyone signs up in column B for Mondays shift and I want to search that column for either 2100B or 2100C and it populate the name that matches that specification in a single cell.

I've attached an example of the spreadsheet I'm working on. Any and all guidance is appreciated.
Upload sample data using XL2BB utility. Can't work with screenshots to populate formulae.
 
Upvote 0
practicing formulas.xlsx
UEUFUG
45Thompson242100B
46garcia
47taylor2100A2100A
48
49lee21302130
50harris2100c
51
520600 Starts1918
530600 Goal1616
54BALANCE +/-32
550600 Avg
561600 Staff1514
571700 Staff1413
5824 or 12pThompsonjones
59Lates34
60Late 2100Aclarkrodriguez
61Late 2100B#N/Aharris
62Late 2130leelee
Schedule
Cell Formulas
RangeFormula
UF52:UG52UF52=COUNTIF(UF$3:UF$51,13)+COUNTIF(UF$3:UF$51,10)+COUNTIF(UF$3:UF$51,"2100A")+COUNTIF(UF$3:UF$51,24)+COUNTIF(UF$3:UF$51,11)+COUNTIF(UF$3:UF$51,"2100B")+COUNTIF(UF$3:UF$51,7)
UF54:UG54UF54=UF52-UF53
UF56:UG56UG56=COUNTIF(UG$3:UG$51,13)+COUNTIF(UG$4:UG$51,2200)+COUNTIF(UG$4:UG$51,2100)+COUNTIF(UG$4:UG$51,2130)+COUNTIF(UG$4:UG$51,24)++COUNTIF(UG$4:UG$51,11)
UF57:UG57UG57=COUNTIF(UG$3:UG$51,13)+COUNTIF(UG$3:UG$51,2200)+COUNTIF(UG$3:UG$51,2100)+COUNTIF(UG$3:UG$51,2130)+COUNTIF(UG$3:UG$51,24)
UF58:UG58UG58=INDEX($UE$4:$UE$51,MATCH(24,UG$4:UG$51,0),1)
UF59:UG59UG59=COUNTIF(UG3:UG51,"2100A")+COUNTIF(UG4:UG51,"2130")+COUNTIF(UG4:UG51,"2100B")
UF60:UG60UG60=INDEX($B$3:$AY$51,MATCH("2100A",UG$3:UG$51,0),1)
UF61UF61=INDEX($B$3:$AY$51,MATCH("2100B",UF$3:UF$51,0),1)
UF62:UG62UF62=INDEX($B$3:$AY$51,MATCH(2130,UF$3:UF$51,0),1)
 
Upvote 0
This is a better version because UG 61 isn't formulated in the first response. Thank you for any and all help :)

practicing formulas.xlsx
UEUFUG
45Thompson242100B
46garcia
47taylor2100A2100A
48
49lee21302130
50harris2100c
51
520600 Starts1918
530600 Goal1616
54BALANCE +/-32
550600 Avg
561600 Staff1514
571700 Staff1413
5824 or 12pThompsonjones
59Lates34
60Late 2100Aclarkrodriguez
61Late 2100B#N/AThompson
62Late 2130leelee
Schedule
Cell Formulas
RangeFormula
UF52:UG52UF52=COUNTIF(UF$3:UF$51,13)+COUNTIF(UF$3:UF$51,10)+COUNTIF(UF$3:UF$51,"2100A")+COUNTIF(UF$3:UF$51,24)+COUNTIF(UF$3:UF$51,11)+COUNTIF(UF$3:UF$51,"2100B")+COUNTIF(UF$3:UF$51,7)
UF54:UG54UF54=UF52-UF53
UF56:UG56UF56=COUNTIF(UF$3:UF$51,13)+COUNTIF(UF$4:UF$51,2200)+COUNTIF(UF$4:UF$51,2100)+COUNTIF(UF$4:UF$51,2130)+COUNTIF(UF$4:UF$51,24)++COUNTIF(UF$4:UF$51,11)
UF57:UG57UF57=COUNTIF(UF$3:UF$51,13)+COUNTIF(UF$3:UF$51,2200)+COUNTIF(UF$3:UF$51,2100)+COUNTIF(UF$3:UF$51,2130)+COUNTIF(UF$3:UF$51,24)
UF58:UG58UF58=INDEX($UE$4:$UE$51,MATCH(24,UF$4:UF$51,0),1)
UF59:UG59UF59=COUNTIF(UF3:UF51,"2100A")+COUNTIF(UF4:UF51,"2130")+COUNTIF(UF4:UF51,"2100B")
UF60:UG60UF60=INDEX($B$3:$AY$51,MATCH("2100A",UF$3:UF$51,0),1)
UF61:UG61UF61=INDEX($B$3:$AY$51,MATCH("2100B",UF$3:UF$51,0),1)
UF62:UG62UF62=INDEX($B$3:$AY$51,MATCH(2130,UF$3:UF$51,0),1)
 
Upvote 0
See if this works for you -

Excel Formula:
=IFERROR(INDEX($B$3:$AY$51,MATCH("2100B",UF$3:UF$51,0),1),INDEX($B$3:$AY$51,MATCH("2100C",UF$3:UF$51,0),1))
 
Upvote 0
That works beautifully! Thank you so much!

The same formula should work if I change 2100b and 2100c to 12p and 24 right? I've been trying to plug it in other columns with those changes but only 12p is resulting in a name, 24 is saying #NA. Thank you again for your help!
 
Upvote 0
I figured it out, if I remove the quotation marks from the 24 or add a letter to the 24 in quotation marks, then it counts it. Thank you so much for your help! :)
 
Upvote 0

Forum statistics

Threads
1,224,743
Messages
6,180,686
Members
452,994
Latest member
Janick

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