Ask Experts Questions for FREE Help !
Ask
    phoenix1664's Avatar
    phoenix1664 Posts: 226, Reputation: 19
    Full Member
     
    #1

    Feb 10, 2015, 12:17 AM
    Macro in Excel 2003
    Hey all right basically (hopefully basic) what I am looking to do is my boss has created a spread sheet of when all the people in the office go out of dxate for certain things some last 3 years some last more or less. He would like the box to do the normal amber and then red when over the alloted time but also to get the box to go red if there is no date entered. I know how to do the red if out of date for each box and the red of nothing entered but that would need to be put in each box so I am wondering if anyone would have a nice macro or an idea to aply it to the whole spreadsheet?

    Thanks in advance
    JBeaucaire's Avatar
    JBeaucaire Posts: 5,426, Reputation: 997
    Software Expert
     
    #2

    Feb 12, 2015, 03:20 AM
    You would use conditional formatting for this.

    If the date were in A1 and that date is good for 3 years, then this Conditional Formatting formula could used to create a rule to apply to that cell to turn it the color if your choice:

    =OR(A1="", DATE(YEAR(A1)+3,MONTH(A1),DAY(A1))<TODAY())

    Once created, the cell will be red if empty or if the date is 3 years old.

    You can copy that cell once it is working and paste it down the column as needed and it will work for each cell applied.

Not your question? Ask your question View similar questions

 

Question Tools Search this Question
Search this Question:

Advanced Search

Add your answer here.


Check out some similar questions!

Excel macro for +1 [ 2 Answers ]

I need to create a macro or formula for excel. I have a number in cell A2 and a information in cell B2. I need to create a macro or use a formula that when I enter information in cell C3 that will auto populate cell B3 with a number that is +1 from cell B2. For clarity, please see below: ...

Excel 2003 Macro VBA Hide / Unhide Multiple Sheets [ 5 Answers ]

I'd like to assign a macro button to hide / unhide a range of sheets in a workbook. I have tried various codes from web but have not been successful. (acutally one of the codes worked if I selected 'run' from the macro menu but does not run if button is clicked). I have tried 'recording'...

Excel Macro needed! [ 13 Answers ]

HI, I have been trying hard to read all the posts here and find a solution to my problem but am not able to do so.. So please help. I have attached an excel sheet to explain my doubt. In the 'summary' sheet I have created a button called Email status. When I click on this button I should be...

Excel Macro [ 13 Answers ]

I have some code that loops through a row and a column and compares data. When it finds the values being equal it copies the columns the row is in and pastes it on another sheet along with the previous value of the column. For Each CCell In Range("C2:C65418") If Not IsEmpty(CCell.Value)...

Excel macro [ 4 Answers ]

I need to run a macro that opens excel so I can kick off "application.ontime" basically my macro should run without me having to start excel, just have the computer and outlook running. Is that possible?


View more questions Search