Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
Sam Sam is offline
external usenet poster
 
Posts: 21
Default automated macro

hello there

in sheet 1 , in column A i have 100 stock names and in column B i
have corr. stock prices.


in sheet 2 , in row 3 from cell d3 onwards till cell DA3 i am
calculating an expression that takes the stock values from sheeet 1
and applies lots of formulas and gives me an output - in that same
row.- but that is automated.......so dont worry abt that
...............

what i wud like to do - is that - to be able to have a macro that
will increment the value of cell b1 by 0.01 ie if it was initially 5 ,
now it shud be 5.01 and as i v used these values in sheet 2 , i shal
have the values in row 3 change correspondingly.....

once this is done , i want the macro to copy the contents of row 3
from sheet 2 and paste them in sheet 3.

once this is done i also want the macro to reset the value of cell b1
back to say 5 ie i want that increment to be reset....

now as this was done for cell b1 , i want that macro to do the same
process to cells b2 , b3 , b4 etc etc till b 100

so that i wud be able to have in sheet 3 - 100 rows of data ....

can some one pls help.....

thanks in advance
sam
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default automated macro

Sam,

Something like:

For i = 1 to 100
Sheets("Sheet2").Cells(i,2)=Sheets("Sheet2").Cells (i,1)+0.01
Next

Change Sheet2 to your sheet. Use i + 1 to offset the row by 1. So that
B1 will go to A2. Change the 1 in Cells(i,1) to the number of whatever
column you need (A = 1, B = 2, etc.)

Amend to fit your needs. Notice that there is no selecting and no change
to the original.
--
sb
"Sam" wrote in message
om...
hello there

in sheet 1 , in column A i have 100 stock names and in column B i
have corr. stock prices.


in sheet 2 , in row 3 from cell d3 onwards till cell DA3 i am
calculating an expression that takes the stock values from sheeet 1
and applies lots of formulas and gives me an output - in that same
row.- but that is automated.......so dont worry abt that
..............

what i wud like to do - is that - to be able to have a macro that
will increment the value of cell b1 by 0.01 ie if it was initially 5 ,
now it shud be 5.01 and as i v used these values in sheet 2 , i shal
have the values in row 3 change correspondingly.....

once this is done , i want the macro to copy the contents of row 3
from sheet 2 and paste them in sheet 3.

once this is done i also want the macro to reset the value of cell b1
back to say 5 ie i want that increment to be reset....

now as this was done for cell b1 , i want that macro to do the same
process to cells b2 , b3 , b4 etc etc till b 100

so that i wud be able to have in sheet 3 - 100 rows of data ....

can some one pls help.....

thanks in advance
sam



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
Automated shifts. Is it possible? AcacioJMartins New Users to Excel 1 February 1st 11 12:29 AM
How can the date be automated? Tom Excel Discussion (Misc queries) 6 April 20th 07 11:02 PM
Automated Popups Brad.R.Sutton Excel Worksheet Functions 1 April 12th 06 03:57 PM
Automated Print in Macro? Michael Kreft Excel Programming 0 July 15th 03 08:15 AM
Automated Print in Macro? Patrick Molloy[_3_] Excel Programming 0 July 15th 03 07:34 AM


All times are GMT +1. The time now is 08:25 PM.

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"