Conditionally format based off multiple calculations

CthulhuNZ

New Member
Joined
Jan 15, 2018
Messages
4
Hi,

I have a sheet essentially as follows:

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]1
[/TD]
[TD]2
[/TD]
[TD]10
[/TD]
[TD]6
[/TD]
[TD]8
[/TD]
[TD]0
[/TD]
[TD]12
[/TD]
[TD]40
[/TD]
[TD]6
[/TD]
[/TR]
[TR]
[TD]Order 1
[/TD]
[TD]2
[/TD]
[TD]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]12
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Order 2
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Order 3
[/TD]
[TD]1
[/TD]
[TD][/TD]
[TD]12
[/TD]
[TD][/TD]
[TD]5
[/TD]
[TD]3
[/TD]
[TD][/TD]
[TD]10
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Order 4
[/TD]
[TD]1
[/TD]
[TD][/TD]
[TD][/TD]
[TD]2
[/TD]
[TD][/TD]
[TD][/TD]
[TD]6
[/TD]
[TD][/TD]
[TD]1
[/TD]
[/TR]
</tbody>[/TABLE]


I'd like to conditionally format each cell in column A based off if any of the quantities in the same row exceed the quantity above them on row 1. In this example Order 1 and 3 would be conditionally formatted but not order 2 and 4.

I'd like to avoid using a macro if possible so it will update in real time as orders are added.

Apologies if this has been asked or answered elsewhere but I could not find something similar by searching.

Regards,
Ashley
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
Hi,

I believe this will do it, use the formula indicated in my sample A7 for your CF formula rule, change/adjust cell references to suit your data:



Excel 2010
ABCDEFGHIJ
1121068012406
2Order 12112
3Order 21
4Order 31125310
5Order 41261
6
71
Sheet3
Cell Formulas
RangeFormula
A7=SUMPRODUCT(--(B$1:J$1))
 
Last edited:
Upvote 0
Hi,


I have a similar situation which I am stumped on. Example as follows:


Material
[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD][/TD]
[TD]10
[/TD]
[TD]0
[/TD]
[TD]-2
[/TD]
[TD]5
[/TD]
[TD]4
[/TD]
[TD]1
[/TD]
[TD]0
[/TD]
[TD]4
[/TD]
[TD]-1
[/TD]
[/TR]
[TR]
[TD]Stock
[/TD]
[TD]50
[/TD]
[TD]20
[/TD]
[TD]8
[/TD]
[TD]10
[/TD]
[TD]5
[/TD]
[TD]2
[/TD]
[TD]1
[/TD]
[TD]8
[/TD]
[TD]1
[/TD]
[/TR]
[TR]
[TD]Order 1
[/TD]
[TD]-20
[/TD]
[TD][/TD]
[TD]-5
[/TD]
[TD][/TD]
[TD]-1
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]-1
[/TD]
[/TR]
[TR]
[TD]Order 2
[/TD]
[TD]-20
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]-1
[/TD]
[/TR]
[TR]
[TD]Order 3
[/TD]
[TD][/TD]
[TD]-20
[/TD]
[TD][/TD]
[TD]-5
[/TD]
[TD][/TD]
[TD]-1
[/TD]
[TD]-1
[/TD]
[TD]-4
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Order 4
[/TD]
[TD][/TD]
[TD][/TD]
[TD]-5
[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
- These cells are a sum of the column below










Looking for a conditional formula which highlights an order (Column A) if it is using any of the material in which row A is a negative number (this order plus other orders would cause stock to drop into negative quantities)

In this example Order 1, 2 and 4 would highlight as they are all part of the sum which causes a negative quantity in D1.

Again trying to avoid VBA so it can update in real time - I've played around with arrays and sumproducts but cannot seem to get it to work.

Any help would be appreciated.

Regards,
Ashley
 
Upvote 0
Select A3:A6

In Conditional Formatting use this formula
=COUNTIFS($B3:$J3,"<0",$B$1:$J$1,"<0")
pick the format you want.

Hope this helps

M.
 
Upvote 0

Forum statistics

Threads
1,224,827
Messages
6,181,200
Members
453,022
Latest member
RobertV1609

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