Match Items in 2 Workbook using CountIf?

jantzen16

New Member
Joined
Dec 7, 2010
Messages
27
Greetings to all,


I am having a problem with matching the value of first workbook and second workbook, for example

Workbook1: A1 = Blue B1 = using the CountIf formula

Workbook2: A8 = Blue

now, in Workbook1 B1 will have a value "Exist".
Any ideas?

Thank you in advance..
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.
Are you looking for something like:

=if(countif([Workbook2]Sheet1!A:A,[Workbook1]Sheet1!A1),"Exist","Doesn't Exist")

Change the workbooks and sheets to the correct names.

Hope that helps.
 
Upvote 0
Hi Andrew and schielrn,

Thank you so much for the reply. I tried your code but seems something wrong with my result. it returns #VALUE in Cell B1.

Any idea why it returns that value ?
 
Upvote 0
Is the source workbook open, which COUNTIF expects? If not you can use a formula like:

=IF(SUMPRODUCT(--([BOOK2.xls]Sheet1!$A1:$A10000=A1)),"Exist","")
 
Upvote 0
Hi Andrew,

It works using SUMPRODUCT(), but if possible this will solve using COUNTIF(), The source workbook is closed.
 
Upvote 0
Hi Andrew,

I already tried the source workbook opened. but nothing happened. and still it returns #VALUE.
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

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