Log in

View Full Version : Compare data between two workbooks



steelstorm
10-11-2012, 07:14 AM
Hello All,
I have 2 workbooks that will both be open when I would run the macro. In the first workbook there is a sheet called “Out_of_the_Oven” with column “I” having the header of “Vendor”, so I would need it to search from “I2” down. What I want to do is compare the names listed in this column to two spreadsheets in another workbook that is called “DNU_CLIENT_LIST_USEME” the first worksheet is named “Probation” and the search would need be from “B8” down and the second worksheet is named “All Clients” with the search going from “B2” down.

Now what I am looking for is if a name from the Out_of_the_Oven column matches one listed in Probation or All Clients I would like it to be bolded, and highlighted in red in the Out_of_the_Oven worksheet to make referencing these a lot easier instead of manually having to look through them.

The name of the workbook containing Out_of_the_Oven does switch daily and is not consistent (but the formatting is), so I’m guessing this is where I would want to put any code and just have it look for the second workbook by name(DNU_CLIENT_LIST_USEME), because it never changes.

I am still far from a pro but I have learned a lot with the help provided here and just wanted to say thanks in advance for any assistance. If any additional info may be needed just let me know.

Simon Lloyd
10-11-2012, 11:40 AM
You could use conditional formatting on the cell so A1 conditional formatting may look like
=COUNTIF([Book2]Sheet1!$K:$K,A1)>0
You can then formatt as you like, whenever there is 1 or more of the cells value it will produce your formatting :)