Conditional gradient formatting per row

50ld13r

New Member
Joined
Dec 27, 2007
Messages
44
HI,

I want to do gradient formatting across the row for each row in my dataset. I have about 1000 rows so don't want to be going crazy with the format painter. It looks like I cant use relative references in the min/max formulas so was wondering how to do it. Ideally I want to avoid helper cells and VBA. Seems that it should be simple but cant figure it out.

Thanks
 
Sorry for the confusion, Dan. I used your code and that worked for me.

My inquiry was to know how I may customize it more, such as adding one more color. In your script, there are only two - low and high. I would like to have a middle color.

About the application of formatting only in respect of each row - this works perfectly. The only odd thing I noticed is that when for instance I have 5 numbers in a row and all of them are 12000, all the numbers are colored with the UpperColour, rather than the LowerColour. If there are no other numbers in the row, 12000 in this case should be lower. This is not an issue with what I'm doing right now but would be great to know how to alter.

All in all, considering the absence of such feature in Excel - conditional formatting only in respect of each row - what you have shared helped a lot. Thank you.
Of course, my apologies, I just remembered you had originally explained that. I'm not quite sure how to go about setting all values to the lowercolor, but let me take a crack at it and I'll update you.
 
Upvote 0

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.
I kind of just answered this question here, but I understand not wanting to click on every row, and I've found an even easier way.
Apply the color scale conditional formatting to the first row, then select those items and do a regular Copy. Now select of the remaining range and select Paste -> Formatting (be sure to use the Format Only or go to the Paste Special... dialog)
1680959189523.png
or
1680959229030.png

This is far easier to do than using a Macro, especially for multiple files.
 
Upvote 0
As mentioned in the other thread that method does not work.
 
Upvote 0
Of course, my apologies, I just remembered you had originally explained that. I'm not quite sure how to go about setting all values to the lowercolor, but let me take a crack at it and I'll update you.
Thank you, Dan.

Actually, just having additional color is more than enough. How do I go about this? What are the lines I change? I tried adding additional color but I get an error. I have no knowledge of scripting at all. I just copy the color set then change it, but that did not work. I guess other parameters will have to be updated, just not sure which.
 
Upvote 0
this
I kind of just answered this question here, but I understand not wanting to click on every row, and I've found an even easier way.
Apply the color scale conditional formatting to the first row, then select those items and do a regular Copy. Now select of the remaining range and select Paste -> Formatting (be sure to use the Format Only or go to the Paste Special... dialog)
View attachment 89308 or View attachment 89309
This is far easier to do than using a Macro, especially for multiple files.

I kind of just answered this question here, but I understand not wanting to click on every row, and I've found an even easier way.
Apply the color scale conditional formatting to the first row, then select those items and do a regular Copy. Now select of the remaining range and select Paste -> Formatting (be sure to use the Format Only or go to the Paste Special... dialog)
View attachment 89308 or View attachment 89309
This is far easier to do than using a Macro, especially for multiple files.
This doesn't work. The comparison, if you do this, still takes the whole range rather than individually per row.
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,160
Members
453,021
Latest member
Justyna P

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