Macro to Start on a New Line Each Time

R

Rob Miller

I have a spreadsheet in which I track daily prices of various stocks i
order to compose an index. Everyday I paste the prices from Yahoo int
an area on the spreadsheet. There are links (locked by "$") in anothe
worksheet, which lists the prices again with the appropriate date(as
way of recording the day's prices) . After pasting the prices, I the
"copy" the row containing the links and "Paste" it to the next row(t
prepare for the next day's prices). Then I "Paste the Values" over th
row I originally copied in order to keep a permanent record of th
day's prices. My problem is I don't know vB. I have tried to record
macro by going down to the bottom the worksheet and then hittin
"end-up arrow" but is seems the macro only records the cell I end u
in, rather than the process I go through to get there. Is there a wa
to write into the macro instructions to always go down one more row?

I hope this is clear enough. The file is attached. I paste to th
worsheet called "Paste Price" and then go through the copy and past
process on each of the other two tabs.

Thanks for your help!

Rober
 
B

Bob Phillips

Rob,

This is one way to get the next free row, assuming column B here

cLastRow = Cells(Rows.Count,"B").end(xlUp).Row+1

to access that cell, use

Cells(cLastRow,"B").Value = ....

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)
 
Top