How can I compare the data from one worksheet and extract True/False results ????

Coletw

New Member
Joined
Dec 6, 2012
Messages
10
:confused:
Hello,

I have two large workbooks, I need to compare both workbooks and if the names and dates match say, "True" and if the names and dates don't match say "False". Do I need to transpose the names so that they match first? One workbook says, "Tom Smith" and the other workbook says, "Smith, Tom"
I need to know did the employee work when he purchased items from the cafeteria.

For example:
Book 1 show employees hrs and date worked.
Book1
Date WorkedSteamship WorkerShip Id #Ship nameEarning codeTotal hours
8/4/2013Tom SmithABC-123New YorkREG15.00
8/4/2013Tom SmithABC-123New YorkVAC8.00
8/4/2013Tom SmithABC-123New YorkSIC8.00
8/4/2013Bill JonesDEF-456ColoradoREG10.00
8/4/2013Robert DellDEF-456ColoradoREG12.00
8/4/2013Robert DellDEF-456ColoradoREG11.00
8/4/2013Steven JohnsGHI-789MarylandVAC8.00
8/4/2013Steven JohnsGHI-789MarylandVAC8.00
8/4/2013Mike ThomsJKL-012GeorgiaSIC10.00
8/4/2013Mike ThomsJKL-012GeorgiaREG10.00

<colgroup><col style="width: 48pt;" width="64"> <col style="width: 66pt; mso-width-source: userset; mso-width-alt: 3218;" width="88"> <col style="width: 48pt;" width="64"> <col style="width: 112pt; mso-width-source: userset; mso-width-alt: 5449;" width="149"> <col style="width: 102pt; mso-width-source: userset; mso-width-alt: 4973;" width="136"> <col style="width: 98pt; mso-width-source: userset; mso-width-alt: 4790;" width="131"> <tbody>
</tbody>


Book 2:
Book show show the cafeteria purchases on different days. I want it to say, "True" if the employee worked on that day or false if the employee had a cafertia purchase but didn't work on that day.


On PTOData #Data Tool #Charged ByCafeteria Purchas #Lunch AmtTransaction Date
12349876Smith, Tom1470 20.00 8/4/13 11:21 AM
12349876Blast, Bill2580 50.00 8/1/13 7:31 AM
12346543Jackson, Michael3698 25.00 8/1/13 8:27 AM
12346543Dell, Robert9632 35.00 8/4/13 10:39 AM
12342100Cher, Steven8521 12.50 8/2/13 1:36 PM
12342100Thoms, Mike7413 36.00 8/4/13 7:24 AM
12345420Jones, Bill5421 11.20 8/4/13 12:24 PM

<colgroup><col style="width: 48pt;" width="64"> <col style="width: 66pt; mso-width-source: userset; mso-width-alt: 3218;" width="88"> <col style="width: 62pt; mso-width-source: userset; mso-width-alt: 2998;" width="82"> <col style="width: 112pt; mso-width-source: userset; mso-width-alt: 5449;" width="149"> <col style="width: 102pt; mso-width-source: userset; mso-width-alt: 4973;" width="136"> <col style="width: 98pt; mso-width-source: userset; mso-width-alt: 4790;" width="131"> <col style="width: 88pt; mso-width-source: userset; mso-width-alt: 4278;" width="117"> <tbody>
</tbody>

<colgroup><col style="width: 66pt; mso-width-source: userset; mso-width-alt: 3218;" width="88"> <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.
Given in Book1 A1:
Date WorkedSteamship WorkerShip Id #Ship nameEarning codeTotal hoursHelper_Column
8/4/13Tom SmithABC-123New YorkREG15Smith, Tom
8/4/13Tom SmithABC-123New YorkVAC8Smith, Tom
8/4/13Tom SmithABC-123New YorkSIC8Smith, Tom
8/4/13Bill JonesDEF-456ColoradoREG10Jones, Bill
8/4/13Robert DellDEF-456ColoradoREG12Dell, Robert
8/4/13Robert DellDEF-456ColoradoREG11Dell, Robert
8/4/13Steven JohnsGHI-789MarylandVAC8Johns, Steven
8/4/13Steven JohnsGHI-789MarylandVAC8Johns, Steven
8/4/13Mike ThomsJKL-012GeorgiaSIC10Thoms, Mike
8/4/13Mike ThomsJKL-012GeorgiaREG10Thoms, Mike

<colgroup><col span="6"><col></colgroup><tbody>
</tbody>

Add one Helper Column in G with the following formula: =TRIM(MID(SUBSTITUTE($B2," ",REPT(" ",999)),COLUMN(B2)*999-998,999))&", "&TRIM(MID(SUBSTITUTE($B2," ",REPT(" ",999)),COLUMN(A2)*999-998,999

Then Book2 A1
On PTOData #Data Tool #Charged ByCafeteria Purchas #Lunch AmtTransaction DateValidity
12349876Smith, Tom1470208/4/13 11:21TRUE
12349876Blast, Bill2580508/1/13 7:31FALSE
12346543Jackson, Michael3698258/1/13 8:27FALSE
12346543Dell, Robert9632358/4/13 10:39TRUE
12342100Cher, Steven852112.58/2/13 13:36FALSE
12342100Thoms, Mike7413368/4/13 7:24TRUE
12345420Jones, Bill542111.28/4/13 12:24TRUE

<colgroup><col span="6"><col><col></colgroup><tbody>
</tbody>

Formula in Column H would be =ISNUMBER(IFERROR(MATCH(D20,$G$2:$G$11,0),"FALSE"))

Adjust name of file to fit your query.

Would that work for you?
 
Upvote 0

Forum statistics

Threads
1,216,747
Messages
6,132,483
Members
449,729
Latest member
davelevnt

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