Conditional Formatting Macro when there is two interdependent Criteria

GERALDRAHMAN

New Member
Joined
Apr 11, 2013
Messages
38
Hi All

I need a macro that will color cells based on the name of the Branch and the daily turnover. If Branch C makes more than 4,000 then Blue, If Branch B makes more than 6,000 then Blue, if Branch A makes more than 10,000 then blue. Other one: If Branch C makes less than 1,000 then Red, If Branch B less than 2,000 Red, If Branch A less than 5,000 Red.

Branch ABranch BBranch C
8,000.008,000.008,000.00
4,000.004,000.004,000.00
12,000.0012,000.0012,000.00
6,000.006,000.006,000.00
11,000.0011,000.0011,000.00
9,500.009,500.009,500.00

<colgroup><col width="64" style="width:48pt"> <col width="64" style="width:48pt"> <col width="64" style="width:48pt"> <col width="64" style="width:48pt"> <col width="64" style="width:48pt"> </colgroup><tbody>
</tbody>

Have tried using the filter, but a Macro would be much better suited and time saving. Thank in advance.
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
Have you tried using conditional formats and formulas? Not sure why this needs to be a macro at all...?
 
Upvote 0
I am reviewing data over a 3 year period, [to identify any trends] so there are many worksheets involved, to physically enter the formulae in each worksheet would take so much time when it can be done using a macro.
 
Upvote 0
Here is an example of the type of macro I need but it doesn't meet the 2 interdependent criteria

Code:
Sub TRIAL()Dim tt As Worksheet, rCel As Range, sCel As Range


For Each tt In ThisWorkbook.Sheets
    tt.Select
    For Each rCel In Range("L15")
        If rCel > 1000 Then rCel.Interior.Color = 255
    Next
Next


End Sub
 
Upvote 0

Forum statistics

Threads
1,214,642
Messages
6,120,698
Members
448,979
Latest member
DET4492

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