Need Help Writing Excel Formual

GALibra109

New Member
Joined
Jul 30, 2018
Messages
4
Hello! Excel semi-newbie here. I need help with a problem I've been tasked to help solve in Excel and it involves figuring out what functions to use to create a formula to pull out the information I need.

Sheet 1 = Candidate Information
This table has 3 columns: Candidate ID, Zip Code and EmpPref

Sheet 2 = Job Order Info
This table also has 3 columns: Job Order ID, Zip Code and EmpPref

I'd like to create a third table that combines the information from the 2 tables. I'd like the third table to have these three columns: Candidate ID, # of Job Order Matches, and Job Order IDs.

I'm having a hard time figuring out how to write a formula (which functions to use) to pull the Job Orders for the correct matching candidates based on Zip Code and EmpPref.

Any help is appreciated!

Thanks!
GALibra109
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Welcome to the Board.

It's a little hard to picture what you want. The old adage that a picture is worth a thousand words definitely applies here. But here's what I surmised:

If your first sheet looks like this:

ABC
1Candidate IDZIP CodeEmpPref
2112345a
3112345b
4112345c
5223456a
6223456b
7334567d
8112345e
9112345f
10223456z
11334567m
12112345g

<colgroup><col style="width: 25pxpx"><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet1




Then your second sheet could look like:

ABCDEFGHI
1Job Order IDZIP CodeEmpPrefCandidate ID# of Job Order MatchesJob Order ID
211134567m13222555888
322212345c23333444777
433323456a31111
544423456a
655512345a
766612345q
877723456z
988812345b
1099934567r
11

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet2

Array Formulas
CellFormula
F2{=SUM(COUNTIFS(B:B,IF(Sheet1!$A$2:$A$12=E2,Sheet1!$B$2:$B$12,"zz"),C:C,IF(Sheet1!$A$2:$A$12=E2,Sheet1!$C$2:$C$12,"zz")))}
G2{=IFERROR(INDEX($A$2:$A$10,SMALL(IF(ISNUMBER(MATCH($E2&"|"&$B$2:$B$10&"|"&$C$2:$C$10,Sheet1!$A$2:$A$12&"|"&Sheet1!$B$2:$B$12&"|"&Sheet1!$C$2:$C$12,0)),ROW($A$2:$A$10)-ROW($A$2)+1),COLUMNS($G2:G2))),"")}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>



Put the formula in F2, confirm by pressing Control+Shift+Enter, then drag the formula down the column. Repeat with the formula in G2, but copy it down and to the right as needed.

Let us know if this works for you.
 
Upvote 0
Eric, thank you so much for your help and quick response. Because I wasn't 100% clear about what my tables looked like, your answer is a little off for what I was looking for, but you DEFINITELY gave me a great starting point! Thank you...I appreciate your help!

GALibra109
 
Upvote 0

Forum statistics

Threads
1,216,038
Messages
6,128,450
Members
449,453
Latest member
jayeshw

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