IF condition in loop and set background color

xlhelp15

Board Regular
Joined
Sep 12, 2014
Messages
113
Office Version
  1. 365
Platform
  1. Windows
  2. Mobile
  3. Web
Hello Experts,

I need your precious solution through VBA for the below query.

I need to match these days in a row wise with the Goal set for the resources and highlight background color if that respective day is lesser than the Goal.

for eg,

Row1 :
Goal : 40 ;
Column 08/01/2018 : 45
Column 08/02/2018 : 60
Column 08/03/2018 : 56
Column 08/06/2018 : 66
Column 08/07/2018 : 0
Column 08/08/2018 : 45

like wise till end of row of GOAL.

Goal 8/1/2018 8/2/2018 8/3/2018 8/6/2018 8/7/2018 8/8/2018
40 45 60 56 66 0 45
50 61 68 77 60 0 60
50 58 58 51 51 33 0
50 54 52 52 61 0 58
50 55 55 51 65 0 60
50 52 50 54 55 0 55
50 33 44 36 47 0 44
50 55 48 42 64 0 42
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.

Forum statistics

Threads
1,213,526
Messages
6,114,136
Members
448,551
Latest member
Sienna de Souza

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