Help with difference in time macro




Hello All,

First of all I want to say this is my first time here and I am on my
learning stages of excel.

I have a report I run on a daily basis and need to calculate the time
difference between previous days and the system date.

All my columns are set to autofilter and the Macro needs to look at 3
columns "E" (PRIORITY), "H" (CREATED) AND "I" (SLA)

It should start by inserting a new column next to "H" and name it SLA
Column H is the date to be compared with system date and the difference
is to be inserted in column "I" (SLA)
(this dates are from days past in this format 07/12/2005 4:42:00 PM)

Now the trick here will be to filter column "E" by keywords "MEDIUM"
"HIGH" AND "TOP"

For MEDIUM: Compare H with system date and insert the difference in "I"
with an IF statement, if the difference is greater than 120 hours then
the background of the cell should be colored in RED.
This is based on a 24/5 clock (meaning it does not include Saturday and
Sunday).

For HIGH: Compare H with system date and insert the difference in "I"
with an IF statement, if the difference is greater than 72 hours then
the background of the cell should be colored in RED.
This is based on a 24/5 clock (meaning it does not include Saturday and
Sunday).

For TOP: Compare H with system date and insert the difference in "I"
with an IF statement, if the difference is greater than 4 hours then
the background of the cell should be colored in RED.
This is based on a 24/7 clock (meaning it includes Saturday and
Sunday).

The columns can vary in lenght, no specific number of cells, it varies
from day to day, and each cell needs to be compared.

Please if any body can help, any information will be greatly
appreciated.


--
chin_un_len
------------------------------------------------------------------------
chin_un_len's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30914
View this thread: http://www.excelforum.com/showthread.php?threadid=505938

.



Relevant Pages

  • Re: In Cuba, next restriction to be lifted: Cellphone service
    ... first time, ... He and Comrade Christensen LOVE to "TELL" Cubans and others with real ... The government had to invest in cell ... state security decided to look the other way. ...
    (soc.culture.cuba)
  • RE: Compare 2 sets of data
    ... If you want to compare column A with F, you have to be positioned in Column ... F, go to conditional formating, enter where the cell vallue is not equal to ... range is different from the second set or Disability Code is different and so ...
    (microsoft.public.excel.worksheet.functions)
  • RE: comparing componants of tables
    ... jimbo, I have to make several assumptions to provide this solution. ... Second assumption, when you do comparisons, you're wanting to compare one ... weights, and not weight for one person to belt size for someone else. ... Here is the basic formula that I placed into cell B18 of this comparison ...
    (microsoft.public.excel.newusers)
  • Re: How to sort/update large excel db
    ... in a cell, save the ss, close, reopen, and the data was in a different cell. ... first, don't sort while the ss is filtered, this will hang your ... > to try for a cleaner sheet to compare to the current one. ... > You'll see True if it appears on that other worksheet. ...
    (microsoft.public.excel.misc)
  • Advanced Swong jTable cells
    ... I'm writing swing application that shall compare differences between ... public Object getValueAt(int rowNumber, int columnNumber) { ... but i would like to improve cell design ... ...
    (comp.lang.java.gui)