Conditional Formating based on Cell Value

diggerdidoodar

Board Regular
Joined
May 20, 2002
Messages
59
I want to if possible format the full row based on the cell value in field "Lev2 Matl". So first 3 rows based on Lev2 Matl=G10TSM05A would be 1 colour. Next 3 rows based on Lev2 Matl=G10TSM05M would be another colour etc etc. No issue with cycling through available colours only. Hope that makes sense.

Below is example of first two columns in my multi column spreadsheet. TW10 is column one, materials beginning with "G" is the "Lev2 Matl" column.

Lev1 Matl Lev2 Matl
TW10 G10TSM05A
TW10 G10TSM05A
TW10 G10TSM05A
TW10 G10TSM05M
TW10 G10TSM05M
TW10 G10TSM05M
TW10 G10TSM05M
TW10 G10TSM07A
TW10 G10TSM07A
TW10 G10TSM07A
TW10 G10TSM07M
TW10 G10TSM07M
TW10 G10TSM07M
TW10 G10TSM07M
TW10 G10TSM10A
TW10 G10TSM10A
TW10 G10TSM10A
TW10 G10TSM10M
TW10 G10TSM10M
TW10 G10TSM10M
TW10 G10TSM10M
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
"So first 3 rows based on Lev2 Matl=G10TSM05A would be 1 colour"

Not specific enough.
Your subject says "Conditional Formating based on Cell Value" but your descripition sounds like the subject should be "Conditional Formating when a cell value changes"

Are you saying you want to format every row that contains G10TSM05A, e.g. red, ie EVERY row that contains G10TSM05A will be red no matter where it is in the list (in which case you will need one colour/rule for EVERY different value in "Lev2 Matl") ?

Or are you saying you want to format the list when a "Lev2 Matl" value changes in which case you need to specify the number of colours you want to use ?
 
Last edited:
Upvote 0
"So first 3 rows based on Lev2 Matl=G10TSM05A would be 1 colour"

Not specific enough.
Your subject says "Conditional Formating based on Cell Value" but your descripition sounds like the subject should be "Conditional Formating when a cell value changes"

Are you saying you want to format every row that contains G10TSM05A, e.g. red, ie EVERY row that contains G10TSM05A will be red no matter where it is in the list (in which case you will need one colour/rule for EVERY different value in "Lev2 Matl") ?

Or are you saying you want to format the list when a "Lev2 Matl" value changes in which case you need to specify the number of colours you want to use ?

I would like to format the list when a "Lev2 Matl" value changes in ascending order. It can just be two colours just to define between the value change.
 
Upvote 0
I would like to format the list when a "Lev2 Matl" value changes in ascending order. It can just be two colours just to define between the value change.
 
Upvote 0
Ok, everywhere Ive looked you need a Helper Column, hide it if you dont want it displayed.

With "Lev1 Matl" in A1, so your data starts in A2, do this

in C2
=IF(B2=B1,C1,C1+1)

Select your entire range, in your example A2:B22

Conditional Formatting
New Rule
Use a formula to determine...

=MOD($C2,2)=0
Format with 1st colour

If you want to alternate with another colour add an extra rule to the selection

=MOD($C2,2)=1
Format with 2nd colour
 
Upvote 0

Forum statistics

Threads
1,214,991
Messages
6,122,628
Members
449,095
Latest member
bsb1122

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