ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   How do I exchange data between worksheets? (https://www.excelbanter.com/excel-programming/392233-how-do-i-exchange-data-between-worksheets.html)

TucAO

How do I exchange data between worksheets?
 
Hi, I tried to do a data exchange between worksheets, should I use "Macro" or
"VB"?
To explain it in a a little detail, I got some experimental data ouput and
saved on one worksheet (named as "Cent1" under "workbook1"). I want to export
these data to another worksheet (named as "sheet1" under "workbook2") to do
some calculation. After the calculation and I want the result from "sheet1"
exporting to and showing in "Cent1". Ideally I want the calculation in
"sheet1" runing behind, which means I don't want Excel load and show
"Sheet1". I just want the "Cent1" sheet shows in screen.
To trigger the data exhange, I plan to put a button as "Calculate" in
"Cent1", so when I hit "Calculate", the data go to "Sheet1" and result shows
in "Cent1" while "Sheet1" runs behind the scene.

Any help is highly appreciated!!


vivmaha

How do I exchange data between worksheets?
 
If u wanna copy from 1 worksheet to another, in VBA, ud do somthing like:
worksheets("Cent1").cells(<Place the co-ordinates here) =
woorksheets("Sheet1").cells(<Place the co-ordinates here)

To explain it in a a little detail, I got some experimental data ouput and
saved on one worksheet (named as "Cent1" under "workbook1"). I want to export
these data to another worksheet (named as "sheet1" under "workbook2") to do
some calculation. After the calculation and I want the result from "sheet1"
exporting to and showing in "Cent1". Ideally I want the calculation in
"sheet1" runing behind, which means I don't want Excel load and show
"Sheet1". I just want the "Cent1" sheet shows in screen.
To trigger the data exhange, I plan to put a button as "Calculate" in
"Cent1", so when I hit "Calculate", the data go to "Sheet1" and result shows
in "Cent1" while "Sheet1" runs behind the scene.

Any help is highly appreciated!!


TucAO

How do I exchange data between worksheets?
 
Thank you, Glad to get a response so quick. However, there is two questions.
Like I explained, I want to put a button named "Calculate" in the sheet
"Cent1", so when I hit "Calculate", the experiment data (6 data) go to
"Sheet1" and the calculated results shows in "Cent1". In addition, I also
want the "Sheet1" runs behind without showing in the excel window? Will the
"copy" load and activate both sheets? and will "activate" brings up and show
the sheet in Excel window?

Thanks very much.

"vivmaha" wrote:

If u wanna copy from 1 worksheet to another, in VBA, ud do somthing like:
worksheets("Cent1").cells(<Place the co-ordinates here) =
woorksheets("Sheet1").cells(<Place the co-ordinates here)

To explain it in a a little detail, I got some experimental data ouput and
saved on one worksheet (named as "Cent1" under "workbook1"). I want to export
these data to another worksheet (named as "sheet1" under "workbook2") to do
some calculation. After the calculation and I want the result from "sheet1"
exporting to and showing in "Cent1". Ideally I want the calculation in
"sheet1" runing behind, which means I don't want Excel load and show
"Sheet1". I just want the "Cent1" sheet shows in screen.
To trigger the data exhange, I plan to put a button as "Calculate" in
"Cent1", so when I hit "Calculate", the data go to "Sheet1" and result shows
in "Cent1" while "Sheet1" runs behind the scene.

Any help is highly appreciated!!


vivmaha

How do I exchange data between worksheets?
 
Better u do this all in a macro.
U seem to be using sheet1 for storage/calculation purposes only, and u seem
to be aiming at making it invisible. Why not just use macro variables to
store the info instead?

So u make the button and link it to a macro called "calc"
this macro loads the info from (6 data) into local variables, does the
calculations and spits the results out on "Cent1"

If ur new to VBA, u can oversimplify ur problem , state it on this
newsgroup, and someone may code it for u (stress on the oversimplify... else
no one would do it). Then u can look at thier code and modify it do do
exactly what u want.

Seeya.

"TucAO" wrote:

Thank you, Glad to get a response so quick. However, there is two questions.
Like I explained, I want to put a button named "Calculate" in the sheet
"Cent1", so when I hit "Calculate", the experiment data (6 data) go to
"Sheet1" and the calculated results shows in "Cent1". In addition, I also
want the "Sheet1" runs behind without showing in the excel window? Will the
"copy" load and activate both sheets? and will "activate" brings up and show
the sheet in Excel window?

Thanks very much.

"vivmaha" wrote:

If u wanna copy from 1 worksheet to another, in VBA, ud do somthing like:
worksheets("Cent1").cells(<Place the co-ordinates here) =
woorksheets("Sheet1").cells(<Place the co-ordinates here)

To explain it in a a little detail, I got some experimental data ouput and
saved on one worksheet (named as "Cent1" under "workbook1"). I want to export
these data to another worksheet (named as "sheet1" under "workbook2") to do
some calculation. After the calculation and I want the result from "sheet1"
exporting to and showing in "Cent1". Ideally I want the calculation in
"sheet1" runing behind, which means I don't want Excel load and show
"Sheet1". I just want the "Cent1" sheet shows in screen.
To trigger the data exhange, I plan to put a button as "Calculate" in
"Cent1", so when I hit "Calculate", the data go to "Sheet1" and result shows
in "Cent1" while "Sheet1" runs behind the scene.

Any help is highly appreciated!!



All times are GMT +1. The time now is 03:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com