Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I know this is simple but I cant get it right. I have a report that I
only want to update if the data is not already there. Right now if the last row is the same as the date on the report things work well. But if the report is run with a date that has already been run it adds this data. How do I check row a to see if the date is there? Sub KeepRecords() 'Check sheet ("MTD").Range (A:A) If value is same as("REPORT"). range ("P1") date GoTo end sub. 'If value different add data from REPORT sheet. Application.ScreenUpdating = False Dim LastRow As Object Set LastRow = Sheets("MTD").Range("A65536").End(xlUp) If LastRow = Sheets("Report_Date").Range("D3") Then GoTo 1 Dim NextRow As Object Set NextRow = Sheets("MTD").Range("A65536").End(xlUp) With NextRow .Offset(1, 0) = Sheets("Report").Range("P1") .Offset(1, 1) = Sheets("Report").Range("C4") .Offset(1, 2) = Sheets("Report").Range("C5") .Offset(1, 3) = Sheets("Report").Range("C6") .Offset(1, 4) = Sheets("Report").Range("G4") .Offset(1, 5) = Sheets("Report").Range("G5") .Offset(1, 6) = Sheets("Report").Range("G6") .Offset(1, 7) = Sheets("Report").Range("G7") .Offset(1, 8) = Sheets("Report").Range("I6") End With 1 End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Check box, then add current time to cell | Excel Worksheet Functions | |||
How can I check a cell for current date and insert it if blank? | New Users to Excel | |||
check to see if all dates are for the current year | Excel Programming | |||
Can I automatically enter the current date or current time into a | New Users to Excel | |||
Current time Current date. | Excel Programming |