How to know if cell value doesn't exist in another sheet

satya12

Board Regular
Joined
Oct 19, 2021
Messages
70
Office Version
  1. 2016
Platform
  1. Windows
Hi All,

Here i am having 2 excel files. i have to take the value from excel 1 and filter that value in excel 2 , if the value doesn't exist in excel2 , add the color in excel1 .
excel 2 values will start on A3 , we have to filter the value in A column in excel 2.

Please help me with this.
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
Hi Satya12,

I'm not sure if I fully understand, more details with examples would be good, and the word "filter" can mean something specific in Excel but I'm going to ignore that and give a simple example.

You say "add the color in excel1" and that suggests a Conditional Format (CF) but CF won't let you refer to another workbook. For that reason I've added a work column in the 1st workbook to do the check and the highlight is based on that result.

Please let me know if this is anything like your requirement.

Satya-B.xlsx
A
1This is Excel B
2
3Goat
4Sheep
5Pig
6Mole
7
8
9Vole
10
11
12
13
Sheet B


Satya-A.xlsx
AB
1This is Excel ATest
2DogTRUE
3CatTRUE
4GoatFALSE
5SheepFALSE
6HorseTRUE
7PigFALSE
8MoleFALSE
9VoleFALSE
10ChickenTRUE
11FALSE
12FALSE
13FALSE
14FALSE
Sheet A
Cell Formulas
RangeFormula
B2:B14B2=AND(A2<>"",ISNA(MATCH(A2,'[Satya-B.xlsx]Sheet B'!$A$3:$A$9999,0)))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A9999Expression=AND(A2<>"",$B2)textNO
 
Upvote 0
Thanks for your help,
What I mean is in the excel 2 that has already filters in the file, what we have to do is we have to check the value in the A col from excel 1 ..we have to the value from excel 1 and search the value in the A col filter , if value is not match in the excel 2 A col filter ..we have to add the color in that cell in excel 1
If you see in the 1st image and 2nd images some of values are not there in 2nd image.in the 2nd image for A col filter already there in the file itself. We have to search those value from 1 st image, if values not found in the 2nd image. We have color the cell in 1st image which value not found in the 2nd image.
I think it's clarify your doubts
 

Attachments

  • IMG_20211210_155737.jpg
    IMG_20211210_155737.jpg
    75.7 KB · Views: 4
  • IMG_20211210_155610.jpg
    IMG_20211210_155610.jpg
    71.5 KB · Views: 4
Upvote 0
No, I'm afraid that doesn't clarify to me but maybe others can understand.

Did my example get close?
 
Upvote 0
No,i think your example doesn't work
1639138049576.png

If you see this image this is Excel 1 we are taking the value from this file and filter it in excel 2
1639138116136.png

This is the excel2 if you see A col has already filter . for example if you see in the excel 1 H5 value is not there excel 2 .
in the moment macro has do
apply color in that value H5 in excel1 ,that output look like this
1639138272971.png
 
Upvote 0
Satya-Excel1.xlsx
A
1PL
2H5
3I6
4N2
5L9
6YU
7KO
8NH
9MC
10
Sheet B


Satya-Excel2.xlsx
AB
1PLTest
2H5TRUE
3I6FALSE
4N2FALSE
5L9FALSE
6YUFALSE
7KOFALSE
8NHFALSE
9MCFALSE
10FALSE
Sheet A
Cell Formulas
RangeFormula
B2:B10B2=AND(A2<>"",ISNA(MATCH(A2,'[Satya-Excel1.xlsx]Sheet B'!$A$3:$A$9999,0)))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A9999Expression=AND(A2<>"",$B2)textNO
 
Upvote 0

Forum statistics

Threads
1,203,137
Messages
6,053,708
Members
444,681
Latest member
Nadzri Hassan

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