Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Karin Schmidt
 
Posts: n/a
Default Creating a macros to copy and paste cells

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


  #2   Report Post  
Duke Carey
 
Posts: n/a
Default

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


"Karin Schmidt" wrote:

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



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
How to copy and paste same formula in multiple cells? Amanda Excel Worksheet Functions 1 June 30th 05 04:16 PM
fairly easy (i thought) copy and paste cells, increment by 17 accross swatsp0p Excel Discussion (Misc queries) 1 May 25th 05 07:55 PM
How do I copy and paste cells incrementally? Slimmyy Excel Worksheet Functions 5 March 18th 05 12:26 AM
Copy & Paste Visible Cells with Formulas Ricky Excel Worksheet Functions 5 January 27th 05 05:37 PM
How do I edit, copy and paste text in excel cells? floridactyl New Users to Excel 2 December 31st 04 03:52 PM


All times are GMT +1. The time now is 10:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"