Forum Discussion
assigning a numerical value to a colored cell
- Jul 25, 2019
I am happy I could help you Chris
Please mark the answer as "Accepted " and Like .
Thank you :)
Good LuckNabil Mourad
Thank you for your answer. I have attempted to attach a basic spreadsheet with cells filled with the colors I am using. I am not sure how to correctly write the 'IF' statement for assigning a value based off the color.
Any assistance is greatly appreciated.
Chris
Hi Chris,
When I recommended an If statement (before you attach a file), I assumed that you are coloring the cells based on a conditional formatting rule that reads a value.
Now the situation when I look at your file is totally different because I cannot create a conditional rule that returns a number based on color (Except in VBA- I can send you a link for that but it's complicated).
So, alternatively, I am going to use a very simple technique to select All Cells with a specific color and type a number in All of them simultaneously:
- Click on "Find & Select" to the right side of the Home Tab
- Select Find...
- Click on Options >> The box expands
- Click on Format >> Select the Eye Dropper tool
- Click on one of the colors in the worksheet
- Click Find All >> The box Expands
- Hit CTRL +A >. you selected All cells of that color
- Close the Find box and Do Not Click anywhere
- Type the number (Say 1) Then Hit CTRL + ENTER (not enter)
- Repeat for each Color
Hope that Helps
Nabil Mourad
- GlennI1475Sep 14, 2022Copper Contributor
I'm on a MacBook using MacOS Monterey 12.5.1. Excel for Mac 16.65
I'm trying to count the number of cells in a row that I have assigned a color. This tip doesn't work as the Find function (to the right of home - "find & select") doesn't provide any options when Options on the bottom right is selected. I do get the "within", "search" and "look in" drop down boxes but selecting Options results in a "Find What" box. The drop down from that is a blank gray selection box.
Please help!
- mathetesSep 14, 2022Gold Contributor
For what it's worth, nabilmourad has not had a post or response on these boards for over two years.
Rather than picking up on a thread that itself is now ancient history, you would be better off starting an altogether new thread with your question, spelling it out a bit more fully in the process. For example, "this tip" that you refer to --- what is it?
- ChrisBlairJul 25, 2019Copper ContributorThis is perfect!!! Thank you very much for the assistance.
Chris- nabilmouradJul 25, 2019MVP
I am happy I could help you Chris
Please mark the answer as "Accepted " and Like .
Thank you :)
Good LuckNabil Mourad