Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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/



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Create macro to start the time anwitha Excel Worksheet Functions 0 October 17th 10 03:09 AM
macro from columns to rows but adding every time a new line [email protected] Excel Discussion (Misc queries) 2 December 7th 08 08:59 PM
Calculate Ending time using Start Time and Elapsed Time Chief 711 Excel Worksheet Functions 5 May 13th 08 04:34 PM
Need macro to start at a new line MHenderson Excel Worksheet Functions 2 November 2nd 07 04:00 PM
Start a macro from a specific line while editing Bernie Deitrick[_2_] Excel Programming 0 October 7th 03 05:47 PM


All times are GMT +1. The time now is 07:44 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"