Hi,
searched the forum but couldn't find an answer.
I would like conditional formatting to highlight duplicate values in column C, only when cell value is over 4 characters.
Your assistance is appreciated.
thanks
Ziv
Hi,
searched the forum but couldn't find an answer.
I would like conditional formatting to highlight duplicate values in column C, only when cell value is over 4 characters.
Your assistance is appreciated.
thanks
Ziv
Last edited by Zivhodiva; 10-15-2020 at 12:58 PM.
Maybe
Formula:Please Login or Register to view this content.
Change the C1:C10 range as necessary
Richard Buttrey
RIP - d. 06/10/2022
If any of the responses have helped then please consider rating them by clicking the small star icon below the post.
Thank you for your reply,
2 issues:
1 - it gives false duplicates for long strings of texts/numbers (I'm using for USPS/UPS tracking numbers and those are typically 18 to 22 characters long)
2 - How can I apply it to the entire column (or for the first 2000 raws) without using the Format brush? (when I use the format brush is removes existing formatting from cells that have existing specific formats, all these cells (that have existing formatting) are 4 characters or less)
thanks
Last edited by Zivhodiva; 10-07-2020 at 09:20 PM.
Please see the yellow banner at the top of the page. It is much easier to help with a sample file.
Attached sample file
Would you clarify please.
Your OP said you wanted to highlight duplicates where the cell value in column C is >4 characters.
It seems from the cells you've coloured that you mean <4 characters
Thanks again for your reply.
My OP is correct.
I can clarify that the reason I need to highlight cells with >4 is because cells <4 already have specific color formatting that i do not want to be changed by the conditional formatting rule.
thanks
So your OP wasn't quite correct. You said nothing about needing to retain any manual painted cells.
Here's a CF I worked on earlier. Put it in C3 and copy down.
Formula:Please Login or Register to view this content.
It doesn't retain the manually painted cells in all circumstances.
We'd need to know what the rules are for manually painting the cells in order to do that.
I suspect your production workbook might have additional stuff which would help. If not then it may be that a macro is necessary.
Hi,
thanks
- How do I "copy down" the conditional formatting formula? I created a conditional formatting rule with your formula for cell C3, then tried to use the Formatting brush to copy it down the column, but the formula cell value remains "C3" even on lower rows.
- regarding the cells that have a different background color. all these cells are <4 characters. the background color is set manually (not via a formula or conditional formatting)
thanks again
The brush only copies the manual formatting. It won't copy a CF
Either copy the formula down or when you first create the CF in C3 use the 'Applies To' box and enter the C3:Cnn range to which you want the CF applied.
Hi,
I tried to apply the formula as you explained (please see attached new "sample".xls)
The formula (or the way I apply it) does Not find duplicates for cells >4
it does find duplicates of cells <4. by "finding" the duplicates of these cells it also changes their formatting.
any idea?
thanks
But your original post mentioned values greater than 4.
When you presented a workbook showing what you wanted it seemed you wanted matches where the values were less than 4.
You now appear to be saying that the length of the text strings is irrelevant. In which case just leave out the IF which tests for the length of the string. i.e.
Formula:Please Login or Register to view this content.
"But your original post mentioned values greater than 4." - Yes, that is what I wrote and what I need.
"When you presented a workbook showing what you wanted it seemed you wanted matches where the values were less than 4." - The workbook only showed that cells <4 have manual background color formatting.
I did not mean to imply that I need to find duplicates for cells <4.
As I wrote in my OP, I need to find duplicates for cells >4 (noting that these cells have relatively long text/numbers strings usually unto 22 characters).
cells with <4 formatting should not be affected (i.e they'll keep their manual background color formatting).
thanks
I feel that the following modification of Richard's formula from post #2 will do what you want:Formula:Please Login or Register to view this content.
Let us know if you have any questions.
Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.
Hi,
thank you for your assistance,
I tried your (JeteMc) formula. result in attached .xlsx
- it did Not identify the duplicate (C29 & C44)
- it was able to "skip" most of the <4 cells as I need, but seem to fail at that when there are more than 2 duplicates (failed to "skip" for C27, C42).
thanks
Sorry about that.
Try the following: =AND(LEN(C2)>4,SUMPRODUCT(--($C$2:$C$49=C2))>1)
The above rule should be applied to =$C$2:$C$49
When I tested on the file only cells C29 and C44 were highlighted light red fill with red font.
Let us know if you have any questions.
Thank you,
its works perfectly
I don't understand how come the last formula works, while the one before doesn't, as they're essentially the same formula, one with "C4", the other with "C2", but the same other than that.
thanks again.
You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'.
It was important to change the references in the formula from C4 to C2 because the Applies to range starts with cell C2 i.e. =$C$2:$C$49
I hope that you have a blessed day.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks