So, since there are no dates in the "example data.xls" file, I presume you will just want to use today's date. As such, it will also have to be a macro since worksheet functions would need a date in the data, too.
So, since we're talking macro, how usable will a macro I give you be since your data set looks pretty dumbed down...or are you actually counting animals?
I've attached this macro to a button to simplify running it. Try running it twice in a row:
Option Explicit
Private Sub CommandButton1_Click()
Dim lastrow As Long
lastrow = Range("A" & Rows.Count).End(xlUp).Row
If Cells(lastrow, "A") = Date Then
MsgBox "Data already gathered for today, exiting..."
Exit Sub
Else
Cells(lastrow + 1, "A") = Date
Range(Cells(lastrow + 1, "B"), Cells(lastrow + 1, "M")).FormulaR1C1 = _
"=INDEX('C:\Documents and Settings\Jerry2\My Documents\Excel Tips\[AnimalData.xls]Sheet1'!C2,MATCH(R1C,'C:\Documents and Settings\Jerry2\My Documents\Excel Tips\[AnimalData.xls]Sheet1'!C1,0))"
Range(Cells(lastrow + 1, "B"), Cells(lastrow + 1, "M")).Value = Range(Cells(lastrow + 1, "B"), Cells(lastrow + 1, "M")).Value
End If
End Sub
Those bits in red you'll have to get right. Correctly located, this macro will work on closed workbooks.
Bookmarks