Hi guys,
I've got a data table with a whole load of dates in the following format:
Column A: DD-MM-YYYY HH:MM:SS
I'm trying to do a sumproduct based on anything within a specific hour, so I've used the following formula to set up another Date column that ignores the MM:SS element of the date:
Column R =IF(DAY(B2)<10,"0"&DAY(B2)&"/"&MONTH(B2)&"/"&YEAR(B2)&" "&HOUR(B2)&":00",DAY(B2)&"/"&MONTH(B2)&"/"&YEAR(B2)&" "&HOUR(B2)&":00")
So in R2 I have 04/10/2012 10:00
On another sheet I've tried to set up a cumulative list of dates, increasing by 1 hour so that I can then use a sumproduct function to return certain values:
Cell A2 =Sheet1!R2 This returns 04/10/2012 10:00
I've then got a formula in cells A2 etc that adds 1 hour to the previous cell:
=A2+ TIME(1,0,0)
Now the sumproduct works for the A2 reference but not for A3 etc. I can see that there's a formatting difference between A2 and A3, as the number in A3 moved to the right ever so slightly. eg
A2 04/10/2012 10:00
A3 _04/10/2012 11:00
A4 _04/10/2012 12:00 <edit> the post isn't showing the slight indent so I've forced it across with a "_", ignore this
etc.
Any ideas what's going wrong? Am I going in completely the wrong direction? I'm sure it's some sort of formatting issue...
Cheers,
Jed.
Bookmarks