Adding data and date

  • Thread starter Thread starter Wayne Burritt
  • Start date Start date
W

Wayne Burritt

Hi: I have 2 columns of data like so...

A B
1 Date Result
2 1/15/04 $234
3 1/16/04 $241
4 1/17/04 $251

and so on...

Each day, I have to go in and add today's date and today's result, which is
a static cell reference R213. I'd like to program a macro that finds the
next available row -- in this case row 5 -- adds today's day and today's
result from R213. Any ideas? Thanks. Wayne
 
Each day, I have to go in and add today's date and today's result, which
is
a static cell reference R213. I'd like to program a macro that finds the
next available row -- in this case row 5 -- adds today's day and today's
result from R213. Any ideas? Thanks. Wayne

Range("A1").End(xlDown).Offset(1, 0).Value = Date
Range("B1").End(xlDown).Offset(1, 0).Value = Range("R213").Value

Rgds,
Andy
 
Thanks Andy: One more thing -- if I wanted to chart the results, how can I
make the chart find the new data?
 
Hi Andy: I get a run-time error 1004: Application defined or
object-definded error.

Best, Wayne
 
Hi Wayne,

Perhaps by describing the sheet object your working on (so you won't get into
trouble if you have currently selected a chart).

Assuming your sheet name is Sheet1

With Sheets("Sheet1")
.Range("A1").End(xlDown)(2) = Date
.Range("B1").End(xlDown)(2)= .Range("R213").Value
End With

Regards,

Daniel M.
 
Back
Top