Using VBA instead of Conditional Formatting - Help Please

CDNWolf

Board Regular
Joined
Nov 14, 2010
Messages
62
Hi guy I have a spreadsheet that has been setup to track "projects" ie: start date - finish date. The cells are then coloured from the start date to the finish date.

Each cell/column has a date based on 1 week ie: N10=01/01/2014, O10=08/01/2014, P10=15/01/2014. The text in these cells has been coloured white to keep it hidden from view. I have used this setup in a range of cells from "N10-MK5011" which cover a full 5 year period x 5000 entries.

Obviously the conditional formatting colours the cells based on the cell values being between "x" date and "X" date.

Now this is conditional formatting is working great but I can not add up the current jobs in each column so I need to create a VBA program to replace the conditional formatting and assign the cells a colour based on the written program.

If anyone able to assist me with this task I'd greatly appreciate it. Unfortunately I am not able to create a VBA program but I can send you a copy of the file for your review.

Thanks in advance :)

Thanks in advance for your help :)
 

Some videos you may like

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,002
Office Version
  1. 365
  2. 2016
Hi CDNWolf,

I'm not sure I follow what the exact nature of the issue is. It would appear the suggestion is that the conditional formatting is somehow interfering with your calculations, is that the case?

Regards

Dave
 

CDNWolf

Board Regular
Joined
Nov 14, 2010
Messages
62
Hi Dave,

The file works as designed but I would like to add up each column to see how many current jobs are in progress. Unfortunately with conditional formatting this is not possible as you can not add up how many cells are red, green, etc. With a VBA program assigning a color to each cell as required they can be added up...
 

CDNWolf

Board Regular
Joined
Nov 14, 2010
Messages
62
Once cells are assigned colors from the VBA code I can create graphs, etc to monitor busy times of the year, year to year comparisons, etc
 

dave3009

Well-known Member
Joined
Jun 23, 2006
Messages
7,002
Office Version
  1. 365
  2. 2016
Can you not apply the same logic that gives you got conditional format to your calculation, after all conditional format is just an IF function.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,489
Messages
5,596,455
Members
414,069
Latest member
StudExcel

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
Top