Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Using a Macro to Copy and move data! - HELP!

Hello,

This is my first time doing this, so please forgive my lack of knowledge.

I am trying to copy information from a sheet in excel to another, so I did a
record macro and performed the operations....problem is, I need this repeated
until all the data is done.

Present Layout:
Column A ColumnB ColumnC, etc
SalesOrder 1234 5678
PONumber 6678 1111
InvoiceDate 12/22/07 12/22/47
RequiredSipDate 08/12/07 01/01/2008

And I'd like it to look like this
SalesOrder PONumber InvoiceDate RequiredSipDate
1234 6678 12/22/07 08/12/07
5678 1111 12/22/47 01/01/07

and I'd like the Macro/Program to run until there is no more info in the
sales order
row of the original layout.

Help!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 137
Default Using a Macro to Copy and move data! - HELP!

Try this one-step approach - Using Paste-Transpose

Give your Sales Info in the Original Data sheets a range name of
"SalesInfo".

I've used "Original Data" and "New Data" as sheet names ... you'll
need to change these to your sheet names. Then:

Sub Switcharoo()
WorkSheets("Original Data").Range("SalesInfo").Copy
Worksheets("New Data").Range("A1").PasteSpecial Paste:=xlPasteAll,
_
Operation:=xlNone, SkipBlanks:=False, Transpose:=True
End sub

Hope this helps

Greg

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 153
Default Using a Macro to Copy and move data! - HELP!

Hi Hopeless inChicago

Here's one possible way. This macro assumes 4 headers as shown in
your example. Change the worksheet names to match your sheets.

regards,

Dave

Sub Arrnge()
Dim rng1 As Range, x As Integer, cnt As Integer
Dim wk1 As Worksheet, wk2 As Worksheet

Set wk1 = Worksheets("sourcesheet")
Set wk2 = Worksheets("targetsheet")

wk1.Activate
Set rng1 = Intersect(Rows(2), ActiveSheet.UsedRange)
x = rng1.Count
cnt = 1

With wk2
Do While rng1(cnt) < ""
For x = 1 To 4
.Cells(cnt, x) = Cells(x, cnt).Value
Next x
cnt = cnt + 1
Loop
End With

End Sub
On Mar 6, 4:39 pm, Hopeless inChicago
wrote:
Hello,

This is my first time doing this, so please forgive my lack of knowledge.

I am trying to copy information from a sheet in excel to another, so I did a
record macro and performed the operations....problem is, I need this repeated
until all the data is done.

Present Layout:
Column A ColumnB ColumnC, etc
SalesOrder 1234 5678
PONumber 6678 1111
InvoiceDate 12/22/07 12/22/47
RequiredSipDate 08/12/07 01/01/2008

And I'd like it to look like this
SalesOrder PONumber InvoiceDate RequiredSipDate
1234 6678 12/22/07 08/12/07
5678 1111 12/22/47 01/01/07

and I'd like the Macro/Program to run until there is no more info in the
sales order
row of the original layout.

Help!



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
set up a macro to copy/ move sheets to individual files Danielle44 Excel Programming 1 April 20th 06 05:38 PM
Need Simple Copy and Insert Row, Move Down Macro [email protected] Excel Programming 12 February 24th 06 04:19 PM
how to move data down a column, and copy it into a row Dave T Excel Discussion (Misc queries) 4 August 18th 05 08:27 AM
Macro to copy cells one row up then move down 4 rows & repeat Josef Excel Programming 4 October 5th 04 08:49 PM
Converting Lotus 123 macro to Excel - copy/move data to worksheet Bernice[_2_] Excel Programming 7 February 12th 04 03:47 PM


All times are GMT +1. The time now is 02:53 PM.

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

About Us

"It's about Microsoft Excel"