Sub compare()
Dim monday As Workbook, sunday As Workbook, target As Worksheet
Set target = ActiveSheet
Set monday = Workbooks.Open("D:\Monday 00-01.xlsx", ReadOnly:=True, _
AddToMru:=False)
Set sunday = Workbooks.Open("D:\Sunday 11-59.xlsx", ReadOnly:=True, _
AddToMru:=False)
target.Range("A1").Value = sunday.ActiveSheet.Range("A1").Value - _
monday.ActiveSheet.Range("A1").Value
monday.Close
sunday.Close
Set monday = Nothing
Set sunday = Nothing
End Sub
I need something to record what the value was in a cell in Excel at 00:01
on a Monday and record the value in the same cell at 11:59 the following Sunday and calculate the difference between the two.
Is this possible?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 489 |
Nodes: | 16 (3 / 13) |
Uptime: | 32:10:17 |
Calls: | 9,667 |
Calls today: | 2 |
Files: | 13,716 |
Messages: | 6,168,943 |