VBA colour cells based on month

Lonemascot

New Member
Joined
Apr 28, 2015
Messages
12
Hi everyone. I have a table on a sheet that I want to apply to some formatting to.

RULE 1
where the B column (or table heading = "VAT quarter") has my VAT quarter end dates in. I want to fill the cell colour based on the month of these in the following way:
January = Orange fill
April = Yellow fill
July = Blue fill
October = Green fill

RULE 2:
Yellow fill to all blank cells in columns E8:O (table heading = "Date" through to "Phase allocation")

RULE 3:
Red fill in column X (table heading = "verified") if value equal to "-"

RULE 4:
Red font in column S, U and V if <0 (table heading = "Total", "NET" and "VAT")

RULE 5:
red font in column B and J if duplicate with anything else in same column (table ehading = "absolute" and "unique")

In an ideal world I'd like this macro to run after any update to the sheet but if this causes a bit of a slow down (there are thousands of rows) I suppose it could run every 5 mins or so.

In the past I have used conditional formatting rules but end up with hundreds of rules being created when rows are inserted/copied etc and it gets in a bit of a mess hence why i wanted the VBA route.

Thank you for any help you can provide.
 
Last edited:

Forum statistics

Threads
1,082,367
Messages
5,365,028
Members
400,819
Latest member
Gossow

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top