vba programming copy/ paste cell values help.

  • Thread starter Thread starter yaoming
  • Start date Start date
Y

yaoming

Hi i have hundreds of values in an excel workbook with formulas, etc...
I want to be able to write a macro that would autmoatically take th
vertical columns and have all the values go horizontally and vic
versa.

FOr exmaple.

2 3 4 5 6 would be when i run the macro...

2
4
6
7

and when i run the macro again it should be

2 3 4 5 6.

I need this to work from sheet to sheet with lots and lots of data.
am stumped! thanks
 
Look at turning on the macro recorder and using copy , then paste special
selecting transpose.

there really isn't enough information here to provide much help. You have
to have someplace to put your data when you transpose it. Since you say you
have a lot of data, it is unclear where it is located and where you want to
place it. Also, rows go to 65536, but columns only go to 256 - more
questions.

Since your values are produced with formulas, it would be important to
understand if you want them to continue to point at the same locations
(requires absolute references) or what you want them to do.
 
well imagine a sheet is like this all filled:


1234
4567
8910


So, i want a macro with data that is already on the sheet to switc
spots, or positions to this.

148
259
361
470

Is this possible. But for now, i just want to find out a way to cop
and paste the cells. Formulas are not important
 
Select the data, do edit =>Copy, select another location, do Edit=>Paste
Special and select the Transpose box at the bottom of the dialog.
 
Back
Top