SOLVED

Highlight duplicate cell in another sheet

Copper Contributor
Hello,
I need some assistance if possible please.

Data in sheet 1, col B.
Data in sheet 2, col B.

If data in Sheet 2 Col B is the same as Sheet 1 Col B, highlight the duplicate in sheet 2.

Thanks
18 Replies
best response confirmed by jvass92 (Copper Contributor)
Solution

@jvass92 

Select column B on Sheet2. Cell B1 should be the active cell in the selection.

On the Home tab of the ribbon, select Conditional Formatting > New Rule...

Select 'Use a formula to determine which cells to format'.

Enter the formula

 

=ISNUMBER(MATCH(B1, 'Sheet 1'!B:B, 0))

 

Substitute the real name of Sheet 1.

Click Format...

Activate the Fill tab.

Select a highlight color.

Click OK, then click OK again.

Thanks so much.

@Hans Vogelaar This worked perfect, even though numerous other sites said it was impossible. THANK YOU!

@jvass92 

 

Thanks! I too have been searching for a solution to this. Everybody says it can't be done.

@Hans Vogelaar is there a way to highlight only if it matches two columns?

 

Currently working on an excel tool for work (logistics), and am trying to get our internal list of preferred origin zip & destination zip to auto-highlight on bid data so it is easy for us to identify our focus. 

 

I have two conditional formatting rules set up, but I would like to combine them into one rule and only highlight if both origin & destination match our master file.

 

Ideally, I'd be able to highlight any zip codes that are within a given radius of our internal data. Let me know if you have any work arounds or ideas!

@Kcsurk 

How do you determine the distance?

For the sake of ease, I'd set both origin & destination radius at 50 miles each

@Kcsurk 

Do you have that information in your workbook? If so, could you attach a small sample workbook demonstrating the problem (without sensitive data), or if that is not possible, make it available through OneDrive, Google Drive, Dropbox or similar?

@Hans Vogelaar I've linked the document. Was discussing with my boss and he thinks a VLookUp between two separate workbooks would work, but he's unsure how to set that up.

 

Open to any suggestions you have & appreciate the assistance!

 

Workbook 

@Kcsurk 

I cannot access that file. You'll have to share it.

Best way for me to share it with you?

@Kcsurk 

Click on my user picture and send me a private message. You should be able to attach the workbook there.

@Hans Vogelaar I'm trying to do something similar.  I have multiple sheets in a workbook where I add a new sheet each month. 

 

Column headers are the same each month, but the data changes.  I have names (Last, First) in Column A (primary account holder) and sometimes in Column B (their spouse, if applicable) on each sheet. 

 

I need to highlight names on the current month's sheet that have appeared within the previous 11 sheets (1 year of rolling data).  Each tab name is the Month and Year (Feb 2024, Mar 2024, etc.) the data applies to. 

 

I can substitute "=ISNUMBER" for "=ISTEXT" in the formula you provided, but I don't know how to have the formula apply to X number of other sheets in the workbook.  

@LPaxGF11 

I'll have to leave that to cleverer persons.

@Peter Bartholomew @djclements @Sergei Baklan @L z. @Patrick2788 

@LPaxGF11 

 

Current month with Cond. Format. rule applied to column A:

sample.png

 

A Power Query based option. With:
- Monthly sheets formatted as Tables
- Tables named MMM_YYYY (Nov_2023, Dec_2023, Jan_2024...)
- A Helper Sheet (to hide) where a Power Query table list names found in previous Months
- A Defined Name (RangeNamesInPreviousMonths) that refers to the above table

 

On current month Table, Cond. Format. rule based on formula:

=ISNUMBER( MATCH($A2, RangeNamesInPreviousMonths, 0) )

 

@L z. thank you.  I'll work on this and report back once I can.  

 

@LPaxGF11 

Attached is the same "re-packaged" as a single query => easier to adapt

1 best response

Accepted Solutions
best response confirmed by jvass92 (Copper Contributor)
Solution

@jvass92 

Select column B on Sheet2. Cell B1 should be the active cell in the selection.

On the Home tab of the ribbon, select Conditional Formatting > New Rule...

Select 'Use a formula to determine which cells to format'.

Enter the formula

 

=ISNUMBER(MATCH(B1, 'Sheet 1'!B:B, 0))

 

Substitute the real name of Sheet 1.

Click Format...

Activate the Fill tab.

Select a highlight color.

Click OK, then click OK again.

View solution in original post