conditional formatting based on a 2nd table value

ajith

Board Regular
Joined
Nov 21, 2012
Messages
215
Office Version
  1. 2016
Platform
  1. Windows
Hello,
I am having two tables, 1 and 2. Advance orders are noted in table 2 and payment is made from the Allotment fed (for each firm, each item and item color) in table 1. The Allotment reduces on giving advance orders (Table 2) and on payments (Table 1) made.

If the difference between acc. balance against any Firm (satisfying two conditions, same item and same item color) in Table 2 and acc. balance in the next entry for the same Firm (satisfying the same two conditions) in Table 1 is less than zero, then the cell (Acc balance) against that Firm's that particular entry in Table 1 has to be highlighted yellow. ie. It should affect only the next same entry in Table 1 and should not affect same earlier entries.

Allotment for John, rose, red = 100
Allotment for Mathew, Lilly, White =200
Allotment for Samuel, rose, pink = 100
Allotment for Mathew, Lilly, White = 200
Allotment for Roy, rose, red = 100
Allotment for Mathew, rose, red =100
Allotment for Mathew, Sunflower, yellow= 100
Allotment for Roy, rose, pink = 100
TABLE 2.
ABCDEF
1DATEFIRMITEMITEM COLORCOSTAcc. BALANCE
224/1/19JohnRoseRed4555
31/2/19MathewLillyWhite20180
41/2/19SamuelRosePink4060
513/2/19MathewLillyWhite20180
614/2/19RoyRoseRed4510
716/2/19MathewRoseRed4555
8

<tbody>
</tbody>
















Table 1.
ABCDEF
1DATEFIRMITEMITEM COLORCOSTAcc. BALANCE
220/1/19MathewSun flowerYellow6040
320/1/19RoyRoseRed4555
425/1/19JohnRoseRed4510
511/2/19RoyRosePink3565
615/2/19RoyRoseRed45-35
7
8

<tbody>
</tbody>
So in Table 1, on entering the cost in E6, the background color in F6 should become yellow.

I hope it is clear. Any clarification could be made.
Pls reply. Macros may also be suggested

Thank you
 

Excel Facts

Fastest way to copy a worksheet?
Hold down the Ctrl key while dragging tab for Sheet1 to the right. Excel will make a copy of the worksheet.

Forum statistics

Threads
1,216,291
Messages
6,129,911
Members
449,540
Latest member
real_will_smith

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