Excel Macro Fill a field with color based on values of multiple columns

emmhor

New Member
Joined
Jun 14, 2017
Messages
17
I got a new task assigned at my work I can't solve by myself because this is not my expertise.

What goal do I want to reach?
I want a macro/condition to fill in a specific column based on a few value's.

Simplified Example:
If you look at SKU "123B" you see Action "Delete" with a quantity of "2" and below you see Action "Add" with a quantity of "1". This means the "Add" quantity is lower then the "Delete" so the "Add" field needs to be colored red
https://i.stack.imgur.com/E6a3W.png

Result : This is how it should look after the macro/condition is ran.
​​https://i.stack.imgur.com/lJ6iF.png

A part of a real example looks like this:You can see many of the same "SKU's" but not all part numbers are the same
https://imgur.com/a/wmKmE


So what the macro/condition has to do is match SKU with Part NR then check difference between the delete/add quantity and if the add quantity is lower then the delete Add needs to be filled in red.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.

Forum statistics

Threads
1,216,114
Messages
6,128,910
Members
449,478
Latest member
Davenil

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