Creating a macros to copy and paste cells

K

Karin Schmidt

I have been trying to figure out a macros that will change a spreadsheet
from a horizontal format to the proper vertical one (my labels are located
in the first COLUMN, instead of the first ROW, with all of the data being
located in the rows to the right). "Offset" seems to be a neccessary part
of this macro, but I don't have a clue how to make it work.

I had another worksheet, where I individually copied and pasted the address
into their own set of rows (For example: A1:A7 contained the name, address,
website, etc for one customer). My macros was supposed to copy and paste
the appropriate cells, so that they would end up in cells: A1G1. At that
point, I could delete the empty row, and have a regular table. Here's what
I started doing...

HELP!!!!!!

Christine
******************************************
Sub Formatting()
'
' Formatting Macro
' Macro recorded 8/4/2005 by Christine Vitale
'
' Keyboard Shortcut: Ctrl+r
'
Range(ActiveCell.Offset(1, 0)).Select
Selection.copy
Range (ActiveCell.Offset(0, -1))
ActiveSheet.Paste
Range(ActiveCell.Offset(2, -1)).Select
Application.CutCopyMode = False
Selection.copy
Range(ActiveCell.Offset(-2, 2)).Select

*** This is where I gave up!*****
ActiveSheet.Paste
Range("A14").Select
Application.CutCopyMode = False
Selection.copy
Range("D11").Select
ActiveSheet.Paste
Range("A15").Select
Application.CutCopyMode = False
Selection.copy
Range("E11").Select
ActiveSheet.Paste
Range("A17").Select
Application.CutCopyMode = False
Selection.copy
Range("F11").Select
ActiveSheet.Paste
End Sub
 
D

Duke Carey

Is there a reason you can't just copy then use the menu to Edit | Paste
Special | Transpose?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top