Finding Data from one cell somewhere on another tab

superskid

Board Regular
Joined
Aug 25, 2006
Messages
160
If I have a number in cell A1 on a tab called "start" and I want to see if that number appears anywhere else on a different tab, Is there a faster way for me to do this than using "OR" for each sell I want it to look at?
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
This formula will respond with the number of times that number is found in the other tab.

=SUMPRODUCT(--ISNUMBER(SEARCH(A1,Sheet2!A1:Z100)))

adjust tab name and range to suit.
 
Upvote 0
How would I use that formatting in conditional formatting. I dont want to count how many times it appers, rather have the cell highlight if it does appear somewhere or remain unhilighted if it doesn't appear.

Thanks again
 
Upvote 0
Sorry,

One more thing, the above mentioned forumula seems to count if I am searching for 7172 and it finds 71722. How do I have it count exact matches only?
 
Upvote 0
Activate cell A1,

Activate the CF dialogue thru" Format|Conditional Formatting, select Formula Is from the 1st drop down and then enter

=SUMPRODUCT(--ISNUMBER(SEARCH(A1,Sheet2!A1:Z100)))>0

click Format and choose your formatting.
 
Upvote 0
The formatting works great, the problem is the cell highlights if an exact match isnt found. IE 7172 highlights even if it doesnt exists since it found 71722
 
Upvote 0
How about perhaps?

=SUMPRODUCT(--ISNUMBER(SEARCH(A1,Sheet2!A1:Z100)),--(LEN(A1)=LEN(Sheet2!A1:Z100)))>0
 
Upvote 0
How about perhaps?

=SUMPRODUCT(--ISNUMBER(SEARCH(A1,Sheet2!A1:Z100)),--(LEN(A1)=LEN(Sheet2!A1:Z100)))>0

Almost there, but you can't reference another worksheet in conditional formatting. I have tried defining the range Sheet2!A1:Z10 as Data and then referencing Data at both points in the forumula where you mention Sheet2, but I get a #VALUE! Error?
 
Upvote 0
Did you write it as:

=SUMPRODUCT(--ISNUMBER(SEARCH(A1,Data)),--(LEN(A1)=LEN(Data)))>0

This works for me.
 
Upvote 0

Forum statistics

Threads
1,221,185
Messages
6,158,406
Members
451,490
Latest member
desktopace

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