Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro to Start on a New Line Each Time
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 -- Message posted from http://www.ExcelForum.com |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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/ |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Create macro to start the time | Excel Worksheet Functions | |||
macro from columns to rows but adding every time a new line | Excel Discussion (Misc queries) | |||
Calculate Ending time using Start Time and Elapsed Time | Excel Worksheet Functions | |||
Need macro to start at a new line | Excel Worksheet Functions | |||
Start a macro from a specific line while editing | Excel Programming |