View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Macro to Start on a New Line Each Time

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)

"Rob Miller " wrote in message
...
I have a spreadsheet in which I track daily prices of various stocks in
order to compose an index. Everyday I paste the prices from Yahoo into
an area on the spreadsheet. There are links (locked by "$") in another
worksheet, which lists the prices again with the appropriate date(as a
way of recording the day's prices) . After pasting the prices, I then
"copy" the row containing the links and "Paste" it to the next row(to
prepare for the next day's prices). Then I "Paste the Values" over the
row I originally copied in order to keep a permanent record of the
day's prices. My problem is I don't know vB. I have tried to record a
macro by going down to the bottom the worksheet and then hitting
"end-up arrow" but is seems the macro only records the cell I end up
in, rather than the process I go through to get there. Is there a way
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 the
worsheet called "Paste Price" and then go through the copy and paste
process on each of the other two tabs.

Thanks for your help!

Robert


---
Message posted from http://www.ExcelForum.com/