ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   changing value of a cell based on another cell color (https://www.excelbanter.com/excel-discussion-misc-queries/10640-changing-value-cell-based-another-cell-color.html)

Gary

changing value of a cell based on another cell color
 
Hello!

I had a user at work who went through a large spreadsheet, and highlighted
the rows of which need to be looked at. Unfortunately, they highlighted them
and didn't insert any other information. As far as I know, you can't sort
based on color. I do know that I can create a macro to insert a value into a
cell based on the color of another cell. How would I go about doing this?

Do I need a key somewhere.. like... do I need to highlight some cells
somewhere with the colors that were used... .and then put numbers next to
them in the column next to those colors which will give the value that I
want returned?
Or, are there already pre-set values based on the colors, and I just need to
say if cell.backgroundcolor is AABBFF, then value.of.current.cell=1

Hope this makes sense!

Dexter



JulieD

Hi Gary

check out
http://www.cpearson.com/excel/colors.htm
and
http://www.cpearson.com/excel/SortByColor.htm

Cheers
JulieD

"Gary" wrote in message
...
Hello!

I had a user at work who went through a large spreadsheet, and highlighted
the rows of which need to be looked at. Unfortunately, they highlighted
them and didn't insert any other information. As far as I know, you can't
sort based on color. I do know that I can create a macro to insert a value
into a cell based on the color of another cell. How would I go about doing
this?

Do I need a key somewhere.. like... do I need to highlight some cells
somewhere with the colors that were used... .and then put numbers next to
them in the column next to those colors which will give the value that I
want returned?
Or, are there already pre-set values based on the colors, and I just need
to say if cell.backgroundcolor is AABBFF, then value.of.current.cell=1

Hope this makes sense!

Dexter




megsy



"Gary" wrote:

Hello!

I had a user at work who went through a large spreadsheet, and highlighted
the rows of which need to be looked at. Unfortunately, they highlighted them
and didn't insert any other information. As far as I know, you can't sort
based on color. I do know that I can create a macro to insert a value into a
cell based on the color of another cell. How would I go about doing this?

Do I need a key somewhere.. like... do I need to highlight some cells
somewhere with the colors that were used... .and then put numbers next to
them in the column next to those colors which will give the value that I
want returned?
Or, are there already pre-set values based on the colors, and I just need to
say if cell.backgroundcolor is AABBFF, then value.of.current.cell=1

Hope this makes sense!

Dexter

you could try to apply conditional formatting to the cells and use different colours for different values for example i have a sheet where if value in cell a1 = x it turns green if value = m it turns red if value = 0 it turns yellow

in the conditional formating box i have used if cell value =m red if cell
value= x green and if cell value = 0 yellow. then at the end of the row i
have 3 columns that count x m & 0 to do this i have applied the
=countif(range_criteria) i.e. count if(A1:D10,"X") count if(A1:D10,"M") count
if(A1:D10,"O")



All times are GMT +1. The time now is 01:26 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com