Trying to match/search 4 columns and taking data from a 5th to put in a 6th column

rhino1301

New Member
Joined
Apr 28, 2017
Messages
3
I'm trying to take two shorter(A/B) columns (last name/first name) and compare with two longer (D/E) columns (last name/first name). On the second set of columns there is a date attached (F). If the search finds a match can it put the corresponding next to the name in the first set (C). I am not an excel master and have been looking into this for way to long with no luck. Is it a combo of a vlookup and match? Help I'm kinda clueless.
ABCDEF
SmithJohnDoeJohn8/15/16
DavisSamSmithChris8/15/16
PattersonCoreyBarnesSally8/15/16
FergusonTimHallKim12/8/15
JohnsonRyan12/8/15
SmithJohn12/8/15
MorbDustin12/8/15
JosephHarry5/19/17
DavisSam5/19/17
DavisLaura5/19/17
RoseJim5/19/17

<tbody>
</tbody>
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Welcome to the forum.

Try:

ABCDEF
1Last NameFirst NameDate
2SmithJohn12/8/2015DoeJohn8/15/2016
3DavisSam5/19/2017SmithChris8/15/2016
4PattersonCoreyNo matchBarnesSally8/15/2016
5FergusonTimNo matchHallKim12/8/2015
6No matchJohnsonRyan12/8/2015
7SmithJohn12/8/2015
8MorbDustin12/8/2015
9JosephHarry5/19/2017
10DavisSam5/19/2017
11DavisLaura5/19/2017
12RoseJim5/19/2017

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

Array Formulas
CellFormula
C2{=IFERROR(INDEX($F$2:$F$12,MATCH(A2&"|"&B2,$D$2:$D$12&"|"&$E$2:$E$12,0)),"No match")}

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



The formula in C2 is an array formula. Enter the formula in the formula bar, change the ranges to match your sheet, then press Control+Shift+Enter (not just enter). Then you can copy the formula down the column as far as needed.

Hope this helps.
 
Upvote 0
I tried the formula and all I got for C2 was 42772. I guess another question I have is Do I have to have the locked area with $ signs or can I do an infinite column with A:A?
 
Upvote 0
I tried the formula and all I got for C2 was 42772. I guess another question I have is Do I have to have the locked area with $ signs or can I do an infinite column with A:A?

Try changing the formatting of C2 from General to Date.

You do not want to use whole column references with array formulas as they will slow your spreadsheet down.

Here is a non-array option assuming that you do not have any names appearing more than once:


Excel 2010
ABCDEFG
1Last NameFirst NameDateLast NameFirst NameDate
2SmithJohn12/8/2015DoeJohn8/15/2016
3DavisSam5/19/2017SmithChris8/15/2016
4PattersonCoreyNo MatchBarnesSally8/15/2016
5FergusonTimNo MatchHallKim12/8/2015
6JohnsonRyan12/8/2015
7SmithJohn12/8/2015
8MorbDustin12/8/2015
9JosephHarry5/19/2017
10DavisSam5/19/2017
11DavisLaura5/19/2017
12RoseJim5/19/2017
Sheet1
Cell Formulas
RangeFormula
C2=IFERROR(1/(1/SUMIFS(G:G,E:E,A2,F:F,B2)),"No Match")
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,084
Messages
6,128,722
Members
449,465
Latest member
TAKLAM

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