Assigning a Coloured Cell a Number

scottie_72

Board Regular
Joined
Mar 6, 2014
Messages
50
Hi There,

I wonder if it was possible to assign a specific number to coloured cells.

I'm trying to figure out something for a holiday camp where if the room number is coloured Yellow that mean that there will be 2 people in a room and if the cell is coloured Blue that there is 1 person in a room and Green means 3 people to a room.

Then use Excel to add out how many towels are needed in total for each cleaner?

is there a way of doing this?

Any help would be appreciated.
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
You can use Conditional Formatting
Cell Value = 1 format as blue
Cell value = 2 format as yellow etc.
 
Last edited:
Upvote 0
Hi Taul,

Sorry I should have explained a little better... on the sheet all the cells (That have the room numbers entered) have their interior coloured - I just was looking for something to total up all the Yellow/Blue & Green Cells to give me a total of what was needed.... I thought it might a simple thing when I started out!
 
Upvote 0
Are you changing the fill colour manually using the "Fill Color" from the ribbon?
You could add a column to type the number of people in the room and let conditional formatting change the colour for you, that may also assist in the second stage of counting the towels needed, assuming it was fixed qty of towels per person.
 
Upvote 0
That sounds cool. At the moment I created a macro & button so that when the rooms are highlighted the button just needs to be clicked? How would you go about your idea? ( sorry for being thick!)
 
Upvote 0
The idea is to form columns :-
column A = Room number
Column B = Qty of people
column C = number of towels or whatever you want.

Column B - use "conditional Format" to change the cell background colour based on the cell value.
So that if the cell value is 1, format as blue
cell value = 2, format as yellow
cell value =3, format as green

So basically, you manually type the number of people in the room and the cell background changes colour automatically.
You can add the conditional formatting to column A as well, so the room number cell also changes.

you mentioned that you have a macro assigned to a button, but what does the macro do?
 
Upvote 0

Forum statistics

Threads
1,214,591
Messages
6,120,427
Members
448,961
Latest member
nzskater

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top