Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Change colour of cells based on dropdown list value in another - Excel professional plus 2016 1

Status
Not open for further replies.

pendle666

Technical User
Jan 30, 2003
295
GB
Hello

I have a number of forms in different colour schemes. The content is the same.

What I'd like to do is pick my company name from the drop down list in cell A2 and depending on which company is selected, will change the colours of other cells in the worksheet.

These cells will be empty for now, it's a form which will be completed.

I've tried using various conditional formatting options,but I can't get it work. I'm used to doing If statements where there is something in a cell already, but not for something like this.

thank you


thank you for helping

____________
Pendle
 
Pendle said:
change the colours of other cells in the worksheet. These cells will be empty for now

So, if you choose company ABC 'from the drop down list in cell A2', how do you want your program to know that cells A3, A5, B7, and X17 to make red, and a few other (random?) cells make blue, if all of them are empty?

---- Andy

"Hmm...they have the internet on computers now"--Homer Simpson
 
I'd try first to build proper formula in cell, with absolute references, to get TRUE or FALSE as required for CF. Next copy the formula to 'formula is' condition of formatted cells.
Alternatively this formula can be assigned to name and have TheName=TRUE in CF formula.

combo
 
Hi both,

Thinking about it, I could name each cell that requires completing - it's quite simple, name, start date, salary blah blah and try colouring them that way.




thank you for helping

____________
Pendle
 
pendle666 said:
... I could name each cell that requires completing ...
If it is a comment to my post - I meant a name that refers to formula instead or range, suggested as default option.

combo
 
Hello

I had some free time this afternoon and I'm sorted, thank you both for your suggestions which got me on my way.

For anyone with a similar issue, here's what I did:

[ul]
[li]I selected all the cells that I wanted to be a particular colour, I then named this "fields"[/li]
[li]In cell A2, I had my dropdown list of Company A, Company B, Company C[/li]
[li]With the Fields range selected, I used Conditional Formatting - Use a formula to determine which cells to format[/li]
[li]for the formula I put =A2="Company A" and then in the format section chose my colour. I then did this for each company[/li]
[/ul]

Now when I select the company from the dropdown list, the cells for the form are the right colour.

thank you for helping

____________
Pendle
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top