Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Macro for coping cells from one worksheet to another

Hi,
I would greatly appreciate it if someone could help me with a code that
would enable me to do the following:
I have one worksheet, 'Calc', where I input figures in cells B2, B4 & B6.
Several formulae then work off this to give results in cells C1 & C2.
Unfortunately I have almost a hundred different figs that need results for.
What I need to be able to do is, rather than manually change the figs in
cells B2, B4 & B6 and copy the results obtained from C1 & C2, write a macro
that would pick the inputs that need to go in to cells B2, B4 & B6 from a
list in another sheet in the workbook called 'Data' from A1:C100 and place
the results obtained from C1 & C2 in this sheet in columns D & E and do this
for each row. Thus the macro would copy cells A1, B1 and C1 from €˜Data and
past them into cells B2, B4 and B6 in €˜Calc respectively. This would then
give results in cells C1 & C2 in €˜Calc which the macro would then copy and
paste in cells D1 and D2 in €˜Data. The macro would then move on to the next
row in €˜Data and repeat the process until the end of the list.
I hope this makes sense. I am a complete novice at VB!
Many thanks
HS
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Macro for coping cells from one worksheet to another

Sorry just realised a mistake in original post.
Hi,
I would greatly appreciate it if someone could help me with a code that
would enable me to do the following:
I have one worksheet, 'Calc', where I input figures in cells B2, B4 & B6.
Several formulae then work off this to give results in cells C1 & C2.
Unfortunately I have almost a hundred different figs that need results for.
What I need to be able to do is, rather than manually change the figs in
cells B2, B4 & B6 and copy the results obtained from C1 & C2, write a macro
that would pick the inputs that need to go in to cells B2, B4 & B6 from a
list in another sheet in the workbook called 'Data' from A1:C100 and place
the results obtained from C1 & C2 in this sheet in columns D & E and do this
for each row. Thus the macro would copy cells A1, B1 and C1 from €˜Data and
past them into cells B2, B4 and B6 in €˜Calc respectively. This would then
give results in cells C1 & C2 in €˜Calc which the macro would then copy and
paste in cells D1 and E1 in €˜Data. The macro would then move on to the next
row in €˜Data and repeat the process until the end of the list.
I hope this makes sense. I am a complete novice at VB!
Many thanks
HS


"ShahAFFS" wrote:

Hi,
I would greatly appreciate it if someone could help me with a code that
would enable me to do the following:
I have one worksheet, 'Calc', where I input figures in cells B2, B4 & B6.
Several formulae then work off this to give results in cells C1 & C2.
Unfortunately I have almost a hundred different figs that need results for.
What I need to be able to do is, rather than manually change the figs in
cells B2, B4 & B6 and copy the results obtained from C1 & C2, write a macro
that would pick the inputs that need to go in to cells B2, B4 & B6 from a
list in another sheet in the workbook called 'Data' from A1:C100 and place
the results obtained from C1 & C2 in this sheet in columns D & E and do this
for each row. Thus the macro would copy cells A1, B1 and C1 from €˜Data and
past them into cells B2, B4 and B6 in €˜Calc respectively. This would then
give results in cells C1 & C2 in €˜Calc which the macro would then copy and
paste in cells D1 and E1 in €˜Data. The macro would then move on to the next
row in €˜Data and repeat the process until the end of the list.
I hope this makes sense. I am a complete novice at VB!
Many thanks
HS

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 94
Default Macro for coping cells from one worksheet to another

The code you need is very simple, really.

My suggestion so you can learn yourself which is 1000 times better than have
someone do it for you is this.

Record a macro that does the opetaion in full that you want, but for 1 set
of values. ie. only 1 iteration of the 100.

Then have a look at a Do While loop in the help files.

All you then need to do is create a counter that derives for you the row
number on the 'Data' you;re on and counts up in the loop.

Hope this helps.

"ShahAFFS" wrote:

Sorry just realised a mistake in original post.
Hi,
I would greatly appreciate it if someone could help me with a code that
would enable me to do the following:
I have one worksheet, 'Calc', where I input figures in cells B2, B4 & B6.
Several formulae then work off this to give results in cells C1 & C2.
Unfortunately I have almost a hundred different figs that need results for.
What I need to be able to do is, rather than manually change the figs in
cells B2, B4 & B6 and copy the results obtained from C1 & C2, write a macro
that would pick the inputs that need to go in to cells B2, B4 & B6 from a
list in another sheet in the workbook called 'Data' from A1:C100 and place
the results obtained from C1 & C2 in this sheet in columns D & E and do this
for each row. Thus the macro would copy cells A1, B1 and C1 from €˜Data and
past them into cells B2, B4 and B6 in €˜Calc respectively. This would then
give results in cells C1 & C2 in €˜Calc which the macro would then copy and
paste in cells D1 and E1 in €˜Data. The macro would then move on to the next
row in €˜Data and repeat the process until the end of the list.
I hope this makes sense. I am a complete novice at VB!
Many thanks
HS


"ShahAFFS" wrote:

Hi,
I would greatly appreciate it if someone could help me with a code that
would enable me to do the following:
I have one worksheet, 'Calc', where I input figures in cells B2, B4 & B6.
Several formulae then work off this to give results in cells C1 & C2.
Unfortunately I have almost a hundred different figs that need results for.
What I need to be able to do is, rather than manually change the figs in
cells B2, B4 & B6 and copy the results obtained from C1 & C2, write a macro
that would pick the inputs that need to go in to cells B2, B4 & B6 from a
list in another sheet in the workbook called 'Data' from A1:C100 and place
the results obtained from C1 & C2 in this sheet in columns D & E and do this
for each row. Thus the macro would copy cells A1, B1 and C1 from €˜Data and
past them into cells B2, B4 and B6 in €˜Calc respectively. This would then
give results in cells C1 & C2 in €˜Calc which the macro would then copy and
paste in cells D1 and E1 in €˜Data. The macro would then move on to the next
row in €˜Data and repeat the process until the end of the list.
I hope this makes sense. I am a complete novice at VB!
Many thanks
HS

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Macro for coping cells from one worksheet to another


The text is very complicated to read and too long. Can you make th
text shorter and show an example?

Lenn

--
Lenny_82
-----------------------------------------------------------------------
Lenny_821's Profile: http://www.excelforum.com/member.php...fo&userid=1517
View this thread: http://www.excelforum.com/showthread.php?threadid=40072

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
Looking to copy a worksheet with all formats and formulas without coping inputed data God's Kid Excel Discussion (Misc queries) 3 October 28th 05 11:59 PM
Another coping and pasting macro Jennifer Excel Programming 1 June 23rd 05 11:03 AM
Coping numbers only in cells to other worksheets. Barracuda Excel Programming 1 June 20th 05 04:54 AM
Trouble Coping Visible Cells JenYancey Excel Discussion (Misc queries) 2 May 25th 05 12:17 AM
Coping all cells with data. Pete Excel Programming 0 January 8th 04 09:40 PM


All times are GMT +1. The time now is 06:00 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"