Conditional formatting

cac1219

New Member
Joined
Feb 27, 2014
Messages
14
I am trying to conditionally format a (fairly) large section using a formula. In the example below, I have rows that may or may not have a total number. If there is a number in the total column, I want the Item name to bold. I am trying to figure out an easier way to format without having to do each row individually. I have tried paint formatter but all of column 1 would bold when A2>0, not format to seperate rows.
Formual for conditional formatting:
If B2>0 then B1 bold
If C2>0 then C1 bold
Etc.

[TABLE="class: grid, width: 303"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]1[/TD]
[TD="align: center"]2[/TD]
[TD="align: center"]3[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"]6[/TD]
[TD="align: center"]7[/TD]
[/TR]
[TR]
[TD="align: center"]A[/TD]
[TD="align: center"]Item[/TD]
[TD="align: center"]Total[/TD]
[TD="align: center"]Mon[/TD]
[TD="align: center"]Tue[/TD]
[TD="align: center"]Wed[/TD]
[TD="align: center"]Thu[/TD]
[TD="align: center"]Fri[/TD]
[/TR]
[TR]
[TD="align: center"]B[/TD]
[TD="align: center"]Carrot[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]5[/TD]
[TD="align: center"] [/TD]
[TD="align: center"]5[/TD]
[TD="align: center"] [/TD]
[TD="align: center"]5[/TD]
[/TR]
[TR]
[TD="align: center"]C[/TD]
[TD="align: center"]Beans[/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[/TR]
[TR]
[TD="align: center"]D[/TD]
[TD="align: center"]Onion[/TD]
[TD="align: center"]4[/TD]
[TD="align: center"] [/TD]
[TD="align: center"]2[/TD]
[TD="align: center"] [/TD]
[TD="align: center"]2[/TD]
[TD="align: center"] [/TD]
[/TR]
[TR]
[TD="align: center"]E[/TD]
[TD="align: center"]Celery[/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[TD="align: center"] [/TD]
[/TR]
</tbody><colgroup><col style="text-align: center;"><col style="text-align: center;"><col style="text-align: center;" span="6"></colgroup>[/TABLE]
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
The way I did this was I selected A2:A5 starting from the top and moving down so that A2 is the active cell.

Then I go to conditional formatting, I choose new rule and choose use a formula to decide which cells to format.

I then enter the formula =B2>0. You only enter it once and make sure there are no $ dollar signs in the formula Excel copies the formula internally so that it applies to the next row and so on down to row 5 because that is where I ended the selection. The key is that A2 is the active cell because in the formula I'm referencing B2 and making sure that there are no dollar signs in the formula means Excel copies the formula to encompass all the cells I selected.




Sheet38


*ABCDEFG
**
******
***
******

<tbody>
[TD="bgcolor: #cacaca, align: center"]1[/TD]
[TD="align: center"]Item[/TD]
[TD="align: center"]Total[/TD]
[TD="align: center"]Mon[/TD]
[TD="align: center"]Tue[/TD]
[TD="align: center"]Wed[/TD]
[TD="align: center"]Thu[/TD]
[TD="align: center"]Fri[/TD]

[TD="bgcolor: #cacaca, align: center"]2[/TD]
[TD="align: center"]Carrot[/TD]
[TD="align: center"]15[/TD]
[TD="align: center"]5[/TD]

[TD="align: center"]5[/TD]

[TD="align: center"]5[/TD]

[TD="bgcolor: #cacaca, align: center"]3[/TD]
[TD="align: center"]Beans[/TD]

[TD="bgcolor: #cacaca, align: center"]4[/TD]
[TD="align: center"]Onion[/TD]
[TD="align: center"]7[/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]2[/TD]

[TD="bgcolor: #cacaca, align: center"]5[/TD]
[TD="align: center"]Celery[/TD]

</tbody>

Conditional formatting
CellNr.: / ConditionFormat
A21. / Formula is =B2>0

<tbody>
[TD="bgcolor: #000000"]Abc

<tbody>
A31. / Formula is =B2>0
A41. / Formula is =B2>0
A51. / Formula is =B2>0

[TD="bgcolor: #000000"]Abc[/TD]

[TD="bgcolor: #000000"]Abc[/TD]

[TD="bgcolor: #000000"]Abc[/TD]

</tbody>
[/TD]

</tbody>


Excel tables to the web >> Excel Jeanie HTML 4
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,237
Messages
6,170,924
Members
452,366
Latest member
TePunaBloke

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