How to Look up and match few fields and return customised words from different sheets/wb

ec4excel

New Member
Joined
Feb 25, 2014
Messages
3
I had been looking around for examples but could not find one.

I need to match data between 2 workbooks / sheet on a cell (column) and only needs to return a value of either "OK" or "UNMATCH".

In WB 1, will be me database, I named it Inv Master List and the workbook that I need to do the checking will be call as Checking.

In Column G of my CHECKING, I will need to look for the DN on column A to match with the DN in Inv Master List, we will then match the data on row 2 with the data of the same DN on the CHECKING workbook. Only when all fields are the same, then it will return a value "OK", and so long as 1 field is not the same, it will return a value of "Unmatch". The reason for doing so is these 2 reports are from 2 different parties and we need to check if data from both party tally.

Inv Master List Sample:
[TABLE="width: 735"]
<tbody>[TR]
[TD]DO[/TD]
[TD]DN[/TD]
[TD]DNDate[/TD]
[TD]JobNo[/TD]
[TD]FL[/TD]
[TD]DN[/TD]
[TD]TF[/TD]
[TD]WH[/TD]
[/TR]
[TR]
[TD]XLYGDD99901[/TD]
[TD]DN13-01-00001[/TD]
[TD="align: right"]2/1/2013[/TD]
[TD]M12-08273-NSA[/TD]
[TD="align: right"]240[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TD]YRTFH887877[/TD]
[TD]DN13-01-00002[/TD]
[TD="align: right"]2/1/2013[/TD]
[TD]M12-08273-NSA[/TD]
[TD="align: right"]60[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]UGJFHW98715[/TD]
[TD]DN13-01-00003[/TD]
[TD="align: right"]2/1/2013[/TD]
[TD]M12-08248-DLC[/TD]
[TD="align: right"]40[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD]UPGKFN54212[/TD]
[TD]DN13-01-00004[/TD]
[TD="align: right"]2/1/2013[/TD]
[TD]M12-08249-HSK[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DUFHBG98412[/TD]
[TD]DN13-01-00005[/TD]
[TD="align: right"]2/1/2013[/TD]
[TD]M12-08249-HSK[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DUFGH126542[/TD]
[TD]DN13-01-00006[/TD]
[TD="align: right"]2/1/2013[/TD]
[TD]M12-08288-YOK[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody><colgroup><col><col><col><col><col span="4"></colgroup>[/TABLE]


The CHECKING workbook sample:

[TABLE="width: 1019"]
<tbody>[TR]
[TD]Completed[/TD]
[TD]DN Date[/TD]
[TD]FL[/TD]
[TD]DN[/TD]
[TD]TF[/TD]
[TD]WH[/TD]
[TD]Checking[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00001[/TD]
[TD="align: right"]2/1/2013[/TD]
[TD]230[/TD]
[TD]15[/TD]
[TD]5[/TD]
[TD]3[/TD]
[TD]Unmatch[/TD]
[TD="colspan: 4"]How put a formula on G2 to check if:[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00002[/TD]
[TD="align: right"]2/1/2013[/TD]
[TD]60[/TD]
[TD]10[/TD]
[TD]5[/TD]
[TD]1[/TD]
[TD]Unmatch[/TD]
[TD="colspan: 5"]A1 here matches with Inv Master List Column B[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00003[/TD]
[TD]2/1/2013[/TD]
[TD]40[/TD]
[TD]15[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD]OK[/TD]
[TD="colspan: 8"]and C1 equals to Inv Master List Column E, D equals to Inv Master List Column F, [/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"] 330[/TD]
[TD="colspan: 3"]How to insert auto sum and with total lines and bold[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 12"]In another words, when the DN matches, we also need to match the values for FL, DN, TF and WH in the same row as the DN. [/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 9"]Only if all matches then, show "OK", so long as 1 field don't match, will show as Unmatch[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 5"]Question 2: How to auto sum if I have the following:[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Completed[/TD]
[TD]DN Date[/TD]
[TD]FL[/TD]
[TD]DN[/TD]
[TD]TF[/TD]
[TD]WH[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00005[/TD]
[TD="align: right"]2/1/2013[/TD]
[TD]200[/TD]
[TD]15[/TD]
[TD]5[/TD]
[TD]3[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00006[/TD]
[TD]2/1/2013[/TD]
[TD]60[/TD]
[TD]10[/TD]
[TD]5[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00008[/TD]
[TD]2/1/2013[/TD]
[TD]40[/TD]
[TD]15[/TD]
[TD]0[/TD]
[TD]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"]300[/TD]
[TD="colspan: 3"]How to insert auto sum with this type of lines and bold if this data are in the same worksheet with blank rows?[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Completed[/TD]
[TD]DN Date[/TD]
[TD]FL[/TD]
[TD]DN[/TD]
[TD]TF[/TD]
[TD]WH[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00099[/TD]
[TD="align: right"]2/1/2013[/TD]
[TD="align: right"]230[/TD]
[TD="align: right"]5[/TD]
[TD="align: right"]3[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00101[/TD]
[TD="align: right"]2/1/2013[/TD]
[TD="align: right"]50[/TD]
[TD="align: right"]10[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00140[/TD]
[TD="align: right"]2/1/2013[/TD]
[TD="align: right"]20[/TD]
[TD="align: right"]15[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"]300[/TD]
[TD="colspan: 3"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody><colgroup><col><col><col><col span="4"><col span="8"></colgroup>[/TABLE]
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
I had been looking around for examples but could not find one.

I need to match data between 2 workbooks / sheet on a cell (column) and only needs to return a value of either "OK" or "UNMATCH".

In WB 1, will be me database, I named it Inv Master List and the workbook that I need to do the checking will be call as Checking.

In Column G of my CHECKING, I will need to look for the DN on column A to match with the DN in Inv Master List, we will then match the data on row 2 with the data of the same DN on the CHECKING workbook. Only when all fields are the same, then it will return a value "OK", and so long as 1 field is not the same, it will return a value of "Unmatch". The reason for doing so is these 2 reports are from 2 different parties and we need to check if data from both party tally.

Inv Master List Sample:
[TABLE="width: 735"]
<tbody>[TR]
[TD]DO
[/TD]
[TD]DN
[/TD]
[TD]DNDate
[/TD]
[TD]JobNo
[/TD]
[TD]FL
[/TD]
[TD]DN
[/TD]
[TD]TF
[/TD]
[TD]WH
[/TD]
[/TR]
[TR]
[TD]XLYGDD99901
[/TD]
[TD]DN13-01-00001
[/TD]
[TD="align: right"]2/1/2013
[/TD]
[TD]M12-08273-NSA
[/TD]
[TD="align: right"]240
[/TD]
[TD="align: right"]15
[/TD]
[TD="align: right"]5
[/TD]
[TD="align: right"]3
[/TD]
[/TR]
[TR]
[TD]YRTFH887877
[/TD]
[TD]DN13-01-00002
[/TD]
[TD="align: right"]2/1/2013
[/TD]
[TD]M12-08273-NSA
[/TD]
[TD="align: right"]60
[/TD]
[TD="align: right"]14
[/TD]
[TD="align: right"]5
[/TD]
[TD="align: right"]1
[/TD]
[/TR]
[TR]
[TD]UGJFHW98715
[/TD]
[TD]DN13-01-00003
[/TD]
[TD="align: right"]2/1/2013
[/TD]
[TD]M12-08248-DLC
[/TD]
[TD="align: right"]40
[/TD]
[TD="align: right"]15
[/TD]
[TD="align: right"][/TD]
[TD="align: right"]1
[/TD]
[/TR]
[TR]
[TD]UPGKFN54212
[/TD]
[TD]DN13-01-00004
[/TD]
[TD="align: right"]2/1/2013
[/TD]
[TD]M12-08249-HSK
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DUFHBG98412
[/TD]
[TD]DN13-01-00005
[/TD]
[TD="align: right"]2/1/2013
[/TD]
[TD]M12-08249-HSK
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DUFGH126542
[/TD]
[TD]DN13-01-00006
[/TD]
[TD="align: right"]2/1/2013
[/TD]
[TD]M12-08288-YOK
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]


The CHECKING workbook sample:

[TABLE="width: 1019"]
<tbody>[TR]
[TD]Completed
[/TD]
[TD]DN Date
[/TD]
[TD]FL
[/TD]
[TD]DN
[/TD]
[TD]TF
[/TD]
[TD]WH
[/TD]
[TD]Checking
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00001
[/TD]
[TD="align: right"]2/1/2013
[/TD]
[TD]230
[/TD]
[TD]15
[/TD]
[TD]5
[/TD]
[TD]3
[/TD]
[TD]Unmatch
[/TD]
[TD="colspan: 4"]How put a formula on G2 to check if:
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00002
[/TD]
[TD="align: right"]2/1/2013
[/TD]
[TD]60
[/TD]
[TD]10
[/TD]
[TD]5
[/TD]
[TD]1
[/TD]
[TD]Unmatch
[/TD]
[TD="colspan: 5"]A1 here matches with Inv Master List Column B
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00003
[/TD]
[TD]2/1/2013
[/TD]
[TD]40
[/TD]
[TD]15
[/TD]
[TD][/TD]
[TD]1
[/TD]
[TD]OK
[/TD]
[TD="colspan: 8"]and C1 equals to Inv Master List Column E, D equals to Inv Master List Column F,
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"] 330
[/TD]
[TD="colspan: 3"]How to insert auto sum and with total lines and bold
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 12"]In another words, when the DN matches, we also need to match the values for FL, DN, TF and WH in the same row as the DN.
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="colspan: 9"]Only if all matches then, show "OK", so long as 1 field don't match, will show as Unmatch
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD="colspan: 5"]Question 2: How to auto sum if I have the following:
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Completed
[/TD]
[TD]DN Date
[/TD]
[TD]FL
[/TD]
[TD]DN
[/TD]
[TD]TF
[/TD]
[TD]WH
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00005
[/TD]
[TD="align: right"]2/1/2013
[/TD]
[TD]200
[/TD]
[TD]15
[/TD]
[TD]5
[/TD]
[TD]3
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00006
[/TD]
[TD]2/1/2013
[/TD]
[TD]60
[/TD]
[TD]10
[/TD]
[TD]5
[/TD]
[TD]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00008
[/TD]
[TD]2/1/2013
[/TD]
[TD]40
[/TD]
[TD]15
[/TD]
[TD][/TD]
[TD]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"]300
[/TD]
[TD="colspan: 3"]How to insert auto sum with this type of lines and bold if this data are in the same worksheet with blank rows?
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Completed
[/TD]
[TD]DN Date
[/TD]
[TD]FL
[/TD]
[TD]DN
[/TD]
[TD]TF
[/TD]
[TD]WH
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00099
[/TD]
[TD="align: right"]2/1/2013
[/TD]
[TD="align: right"]230
[/TD]
[TD="align: right"]5
[/TD]
[TD="align: right"]3
[/TD]
[TD="align: right"]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00101
[/TD]
[TD="align: right"]2/1/2013
[/TD]
[TD="align: right"]50
[/TD]
[TD="align: right"]10
[/TD]
[TD="align: right"]2
[/TD]
[TD="align: right"]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]DN13-01-00140
[/TD]
[TD="align: right"]2/1/2013
[/TD]
[TD="align: right"]20
[/TD]
[TD="align: right"]15
[/TD]
[TD="align: right"][/TD]
[TD="align: right"]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD="align: right"]300
[/TD]
[TD="colspan: 3"][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]

Someone has solved this for me but I could not find the place to mark this as solved or closed.
 
Upvote 0

Forum statistics

Threads
1,223,752
Messages
6,174,294
Members
452,554
Latest member
Louis1225

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