Copilot for Microsoft 365 Tech Accelerator
Feb 28 2024 07:00 AM - Feb 29 2024 10:30 AM (PST)
Microsoft Tech Community

Conditional formatting duplicates doesn't highlight them

Silver Contributor

I have the strangest thing. I have a workbook with three columns listing 4 rows of formulas preceded by an apostrophe, to convert them to text. Each row contains the same formula. I can prove it by doing a comparison =B2=A2, which yields TRUE. But if I try to highlight them using Conditional formatting, highlight duplicates, nothing gets highlighted! (see attached file and screen-shot below).

 

What am I missing?

JanKarelPieterse_0-1707135731102.png

 

6 Replies

@Jan Karel Pieterse 

It looks like Excel is trying to be too clever once again. Even though the apostrophes cause the values to be text, I suspect that Excel still sees formulas.

If you delete all the = signs from A2:C5, the cells will be highlighted.

But it gets weirder. If you remove the = from A2 and B2, Excel will highlight A2, B2 and C2.

 

I'd report a bug...

@Hans Vogelaar I figured as much, but thought I'd ask in case I missed something obvious. Bug reported!

@Jan Karel Pieterse 

Very interesting case.  It appears Excel reads the '*' as a wildcard in this context. It seems to do the same for '?' as well.  Initially, I thought it was something with the functions so that's why you see some made up functions in the cap below.

 

Patrick2788_0-1707143589437.png

 

@Patrick2788 Nice find. I wonder though, since both formulas in A2 and B2 are identical, the presence of wild-chard characters shouldn't make a difference; they are still duplicates. Looks like their algorithm doesn't escape wild-card characters?

Anyways, I tried some more combinations and here it gets interesting. I have this:

JanKarelPieterse_0-1707144385820.png

Next, I do a search and replace on row 4, removing the = signs. This is what happens:

JanKarelPieterse_1-1707144496569.png

Huh????

@Jan Karel Pieterse 

It's interesting that this quirk doesn't seem to be documented in any support article nor in the more in depth articles at https://learn.microsoft.com/. I even dug through some old Excel user guides in the wayback machine with no luck.  For grins I ran it by co-pilot and it merely confirmed * and ? are treated as wildcards.  Co-pilot tends to be all over the place in Excel (it's not yet aware of newer functions like TAKE, DROP, WRAPROWS, etc.) but can be OK on facts (Oddly, it is aware of thunks.).

@Patrick2788 

Yes it is odd indeed. IMO the fact it seems to interpret them as wildcard characters is a bug leading to unexpected behavior potentially giving both false positives and false negatives. People rely on the highlight duplicates feature to do precisely that: highlight the duplicates.

 

That was what I was trying to do with these formulas (placed in the cell as text): spot which were different!