ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Macro to Create Table (https://www.excelbanter.com/excel-programming/338789-macro-create-table.html)

Giovanna

Macro to Create Table
 
Could you please help me!!!!!!!!!!!!!
I have a excel file "A" located in C:\test\A.xls..This file has the
following information:
Cell(A1) = Work Order
Cell(A2) = Track
Cell(A3) = Date

I want a macro to send this information in the file"B" located in
C:\test\B.xls...but ordered in this way:
Cell(A1) = Work Order
Cell(B1) = Track
Cell(C1) = Name

Then, I want to do this:
Typed again in the file"A"
Cell(A1) = 3000
Cell(A2) = 50
Cell(A3) = John
and see in the file"B"
Cell(A2) = 3000
Cell(B2) = 50
Cell(C2) = John

And so on, so the new information is always taking the empty row.

Could you please provide me the code........

Thankssssssss.

Giovanna.


Patrick Molloy[_2_]

Macro to Create Table
 
start the macro-recorder
select the area in 'A' that you want to copy and Edit/Copy
activate 'B'
Use PasteSpecial, Value , Transpose

stop the recorder and examine the code.

Transpose is the function that you can use to rotate a table.

Best way to learn is to play with recorded macros and to try to see what is
being done...and then doing it better!






"Giovanna" wrote:

Could you please help me!!!!!!!!!!!!!
I have a excel file "A" located in C:\test\A.xls..This file has the
following information:
Cell(A1) = Work Order
Cell(A2) = Track
Cell(A3) = Date

I want a macro to send this information in the file"B" located in
C:\test\B.xls...but ordered in this way:
Cell(A1) = Work Order
Cell(B1) = Track
Cell(C1) = Name

Then, I want to do this:
Typed again in the file"A"
Cell(A1) = 3000
Cell(A2) = 50
Cell(A3) = John
and see in the file"B"
Cell(A2) = 3000
Cell(B2) = 50
Cell(C2) = John

And so on, so the new information is always taking the empty row.

Could you please provide me the code........

Thankssssssss.

Giovanna.


Giovanna

Macro to Create Table
 
Patrick'
I did these steps already. But I do not how to make the macro write the new
data in the next empty row.
Can you give any advise please?

Thanks.
Giovanna

"Patrick Molloy" wrote:

start the macro-recorder
select the area in 'A' that you want to copy and Edit/Copy
activate 'B'
Use PasteSpecial, Value , Transpose

stop the recorder and examine the code.

Transpose is the function that you can use to rotate a table.

Best way to learn is to play with recorded macros and to try to see what is
being done...and then doing it better!






"Giovanna" wrote:

Could you please help me!!!!!!!!!!!!!
I have a excel file "A" located in C:\test\A.xls..This file has the
following information:
Cell(A1) = Work Order
Cell(A2) = Track
Cell(A3) = Date

I want a macro to send this information in the file"B" located in
C:\test\B.xls...but ordered in this way:
Cell(A1) = Work Order
Cell(B1) = Track
Cell(C1) = Name

Then, I want to do this:
Typed again in the file"A"
Cell(A1) = 3000
Cell(A2) = 50
Cell(A3) = John
and see in the file"B"
Cell(A2) = 3000
Cell(B2) = 50
Cell(C2) = John

And so on, so the new information is always taking the empty row.

Could you please provide me the code........

Thankssssssss.

Giovanna.



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

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