Customised colour scale using / as the value

winds

Board Regular
Joined
Mar 9, 2022
Messages
69
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. MacOS
How to make a color scale in excel so that it applies to "/", and the color scale already starts red when only this value is inputted without the need to input other values.

In context, from what I understand, conditional formatting works so that as more values are inputted, the color scales adjust, but in this case that I am looking for, the color scales don't need to adjust, so when "/" is inputted it starts off with say red immediately and not the usual case say green so that when another "/" is inputted it will adjust.
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
are you counting the //// as they are entered

what the largest number of /// which will be entered into the cell
may need a helper column to count / and use that

i have used a number bar

as conditional formatting -
and a count
=LEN(A1)-LEN(SUBSTITUTE(A1,"/",""))

But trying to work out how the data bar will work with a different cell -

but clarifying of the /// may help

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone
 
Upvote 0
not managed to do it the same cell - various google searches has not come back with a solution

so with a helper column which counts the //// I have assumed 10 is 100% fill - and so used 0 to 10
but you can do other things

not sure if xl2bb shows the data line, so it doesnot

so i have included a link to dropbox - but the copy will only be available for a few days

Book8
AB
1//2
2///3
3////4
40
5//2
6/1
Sheet1
Cell Formulas
RangeFormula
B1:B6B1=LEN(A1)-LEN(SUBSTITUTE(A1,"/",""))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B1:B6Other TypeDataBarNO
A1:A6Other TypeColor scaleNO
A1:A6Other TypeDataBarNO


 

Attachments

  • Screenshot 2023-03-14 at 14.47.44.png
    Screenshot 2023-03-14 at 14.47.44.png
    37.5 KB · Views: 3
Upvote 0
I
not managed to do it the same cell - various google searches has not come back with a solution

so with a helper column which counts the //// I have assumed 10 is 100% fill - and so used 0 to 10
but you can do other things

not sure if xl2bb shows the data line, so it doesnot

so i have included a link to dropbox - but the copy will only be available for a few days

Book8
AB
1//2
2///3
3////4
40
5//2
6/1
Sheet1
Cell Formulas
RangeFormula
B1:B6B1=LEN(A1)-LEN(SUBSTITUTE(A1,"/",""))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B1:B6Other TypeDataBarNO
A1:A6Other TypeColor scaleNO
A1:A6Other TypeDataBarNO


meant more like one "/" per column. So when a / is typed in one cell the colour would already be red immediately. Eventually there should be a total of about 732 "/"
 
Upvote 0
oh ok

I'm sorry but i dont think i follow exactly what you want , you talk of colour scales and then when a / is typed in turn the cell red

meant more like one "/" per column.
Not sure what that means - does that mean you want the column to turn red as soon as a / is typed in ?

not sure what
should be a total of about 732 "/"
means - is this to work a percent out of how many / have been entered so far

can you mock up an example - see below how to post

if you just want a cell to change colour when a / is entered
in which case
just use conditional formatting

=a1="/"

OR if the / can be anywhere on the row

then just select the range and use same formula

Book4
ABCDEF
1
2/
3/
4/
5/
6
7/
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A1:F15Expression=A1="/"textNO


Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet. Plus we cannot see any of the formulas used.

Therefore -

A SMALL sample spreadsheet, around 10-20 rows, would help a lot here, with all sensitive data removed, and expected results mocked up and manually entered, with a few notes of explanation.

MrExcel has a tool called “XL2BB” that lets you post samples of your data and will allow us to copy/paste your sample data into our Excel spreadsheets, saving a lot of time.

You can also test to see if it works ok, in the "Test Here" forum.

OR if you cannot get XL2BB to work, or have restrictions on your PC

then put the sample spreadsheet onto a share

I only tend to goto OneDrive, Dropbox or google docs , as I'm never certain of other random share sites and possible virus.
Please make sure you have a representative data sample and also that the data has been desensitised, remember this site is open to anyone with internet access to see - so any sensitive / personal data should be removed

Make sure you set any share or google to share to everyone

As i say - sorry if i'm not getting what you are after
 
Upvote 0
It will only be in one row, and if it can be colour coded as soon the 1st one is typed. But there will in total be about 700+

 
Upvote 0
thank you for doing that
yes you can colour as soon as the first one is typed in]
but you are showing 3 different colours
does that mean you want 700+ colours
each colour will need a rule - something like countif()
But you wont have 700+ rules , nor really choose 700+ different colours/shades
to do what you have shown
would just need 3 rules for the 3 colours

BUT i dont think thats what you want
hence perhaps thats what you meant by colour scale

it maybe possible to select the row - column A to AJZ and perhaps do something in VBA (i dont do vba solutions here)

can you confirm what happens if you have say 700 on a line - what colours would you want

easy to do 1 even maybe 5 different colours and then the same colour for 6 or more in a row
 
Upvote 0
Basically like traffic light from red to yellow to green... but it will be spread out to about 700+ /
 
Upvote 0
you can do if 1 in a row RED , if 2 in a row Yellow , if 3 or more in a row green

Book4
ABCDEFGHIJKLMNOPQR
1
2/////
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:Z2Expression=AND(A2="/",COUNTIF(A2:$A$2,"/")>=3)textNO
A2:Z2Expression=AND(A2="/",COUNTIF($A$2:A2,"/")=2)textNO
A2:Z2Expression=AND(A2="/",COUNTIF(A2, "/")=1)textNO


Setup 3 RULES - order green,yellow, then red and use stop if true

for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
Conditional Formatting

Highlight applicable range >>
A2:AZJ2 - Change, reduce or extend the rows to meet your data range of rows

Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:
=AND(A2="/",COUNTIF(A2:$A$2,"/")>=3)

Format [Number, Font, Border, Fill] GREEN
choose the format you would like to apply when the condition is true
OK >> OK

repeat for the following 2 rules
for yellow
=AND(A2="/",COUNTIF($A$2:A2,"/")=2)
for red
=AND(A2="/",COUNTIF(A2, "/")=1)
 
Upvote 0
Almost there but the problem with this it's just 3 colours. I was thinking more like once 700+ are filled in it would be a very long spectrum of red to yellow to green, but it would be sort of like the end is dark red, gradually transitioning to orange and middle would be pure yellow about 350+, then towards 700 transitioning to green.. hence the colour scale.
 
Upvote 0

Forum statistics

Threads
1,214,927
Messages
6,122,309
Members
449,080
Latest member
jmsotelo

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