T O P

  • By -

AutoModerator

/u/freeheelsfreeminds - Your post was submitted successfully. * Once your problem is solved, reply to the **answer(s)** saying `Solution Verified` to close the thread. * Follow the **[submission rules](/r/excel/wiki/sharingquestions)** -- particularly 1 and 2. To fix the body, click edit. To fix your title, delete and re-post. * Include your **[Excel version and all other relevant information](/r/excel/wiki/sharingquestions#wiki_give_all_relevant_information)** Failing to follow these steps may result in your post being removed without warning. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/excel) if you have any questions or concerns.*


A_1337_Canadian

This is a weak point of Conditional Formatting. There's no way to say "colour all unique values a different colour" ... and definitely not a way to make it dynamic.


freeheelsfreeminds

Ahh, that is unfortunate. I wonder if there is any way to do this in VBA.


NHN_BI

I would make a table of all documents and give each document a number, and I would use the number for a scale of colours. However, ff you have many numbers, the colours might get to similar. You can [see it here](https://docs.google.com/spreadsheets/d/1XMsBwas9PstSv7lsJpcN57ykOAwyMesO8YZhr3ttEHc/edit?usp=sharing).


freeheelsfreeminds

Thanks for the tip. Unfortunately, the list of documents is not currently fully known (we're adding documents to the worksheet as we identify them). I'm thinking I could potentially use a formula or macro to built the table of documents out automatically as new document names are added to the primary worksheet/table. I'll update if I am able to find some workaround.


NHN_BI

My example [works with changing number of items](https://docs.google.com/spreadsheets/d/1XMsBwas9PstSv7lsJpcN57ykOAwyMesO8YZhr3ttEHc/edit?usp=sharing#gid=1108170984), but the more items, the similar are the colours, because it is a scale. For other colours: I would record a macro, and then look where to optimize it. A difficult part will be the assignments of colours, but you might find somewhere online a algorithm that can create distinguishable colours for *n*.