LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
sd sd is offline
external usenet poster
 
Posts: 9
Default Check for current date in a row

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Check box, then add current time to cell Joe Excel Worksheet Functions 5 January 9th 07 12:25 AM
How can I check a cell for current date and insert it if blank? Don K New Users to Excel 3 September 29th 06 02:46 PM
check to see if all dates are for the current year Oldjay[_2_] Excel Programming 2 December 27th 05 12:41 AM
Can I automatically enter the current date or current time into a Ben New Users to Excel 7 October 19th 05 03:38 PM
Current time Current date. yo beee Excel Programming 3 July 22nd 04 03:41 AM


All times are GMT +1. The time now is 10:06 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"