Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Moving data from one place to another

I have a spreadsheet with several thousand rows. I made every other row blank
using a macro I found here (thanks!). Now, I need to move the data that
resides in Row 1 L, M, N, O (a populated row) to Row 2 C, D, E, F (the blank
row I inserted) for the whole sheet.

Is this possible? Can someone help me out?

Thanks-
Karen
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default Moving data from one place to another

Sub MoveData()
RowCount = 1
Do While Range("A" & RowCount) < ""
Range("L" & RowCount & ":O" & RowCount).Cut _
Destination:=Range("C" & (RowCount + 1))
RowCount = RowCount + 2
Loop

End Sub

"Karen Sigel" wrote:

I have a spreadsheet with several thousand rows. I made every other row blank
using a macro I found here (thanks!). Now, I need to move the data that
resides in Row 1 L, M, N, O (a populated row) to Row 2 C, D, E, F (the blank
row I inserted) for the whole sheet.

Is this possible? Can someone help me out?

Thanks-
Karen

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Moving data from one place to another

Sub Macro1()
For i = 1 To 100 Step 2
Range("L" & i & ":O" & i).Select
Selection.Cut
Range("C" & i + 1).Select
ActiveSheet.Paste
Next
End Sub

Adjust the 100 (table size) to suit your needs.
--
Gary''s Student - gsnu200829


"Karen Sigel" wrote:

I have a spreadsheet with several thousand rows. I made every other row blank
using a macro I found here (thanks!). Now, I need to move the data that
resides in Row 1 L, M, N, O (a populated row) to Row 2 C, D, E, F (the blank
row I inserted) for the whole sheet.

Is this possible? Can someone help me out?

Thanks-
Karen

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4
Default Moving data from one place to another

Well, either I'm completely misunderstanding both of your replies (which is a
distinct possibility!) or I didn't explain myself well enough.

I need to move the data in Row 1 cells L, M, N, O to Row 2 cells C, D, E, F,
then the data in Row 3, cells L, M, N, O to Row 4, cells C, D, E, F, then the
next two rows, then the next, etc., until I reach the end.

I already figured out that i have to temporarily delete my header row, but
is there anything else I need to do to make this work correctly?

Karen


"Gary''s Student" wrote:

Sub Macro1()
For i = 1 To 100 Step 2
Range("L" & i & ":O" & i).Select
Selection.Cut
Range("C" & i + 1).Select
ActiveSheet.Paste
Next
End Sub

Adjust the 100 (table size) to suit your needs.
--
Gary''s Student - gsnu200829


"Karen Sigel" wrote:

I have a spreadsheet with several thousand rows. I made every other row blank
using a macro I found here (thanks!). Now, I need to move the data that
resides in Row 1 L, M, N, O (a populated row) to Row 2 C, D, E, F (the blank
row I inserted) for the whole sheet.

Is this possible? Can someone help me out?

Thanks-
Karen

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default Moving data from one place to another

Both Joel's macro and my macro will do want you want. Perhaps we should have
explained how they are used:


Macros are very easy to install and use:

1. ALT-F11 brings up the VBE window
2. ALT-I
ALT-M opens a fresh module
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE window as above
2. clear the code out
3. close the VBE window

To use the macro from Excel:

1. ALT-F8
2. Select the macro
3. Touch RUN

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

--
Gary''s Student - gsnu200829


"Karen Sigel" wrote:

Well, either I'm completely misunderstanding both of your replies (which is a
distinct possibility!) or I didn't explain myself well enough.

I need to move the data in Row 1 cells L, M, N, O to Row 2 cells C, D, E, F,
then the data in Row 3, cells L, M, N, O to Row 4, cells C, D, E, F, then the
next two rows, then the next, etc., until I reach the end.

I already figured out that i have to temporarily delete my header row, but
is there anything else I need to do to make this work correctly?

Karen


"Gary''s Student" wrote:

Sub Macro1()
For i = 1 To 100 Step 2
Range("L" & i & ":O" & i).Select
Selection.Cut
Range("C" & i + 1).Select
ActiveSheet.Paste
Next
End Sub

Adjust the 100 (table size) to suit your needs.
--
Gary''s Student - gsnu200829


"Karen Sigel" wrote:

I have a spreadsheet with several thousand rows. I made every other row blank
using a macro I found here (thanks!). Now, I need to move the data that
resides in Row 1 L, M, N, O (a populated row) to Row 2 C, D, E, F (the blank
row I inserted) for the whole sheet.

Is this possible? Can someone help me out?

Thanks-
Karen

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
Moving decimal place to show currency in £000's Sarah (OGI) Excel Discussion (Misc queries) 1 October 23rd 08 09:52 AM
Data Validation when a list is already in place ALEX Excel Worksheet Functions 3 January 26th 07 01:54 PM
what does it mean when you get #### in place of the data entered NM Excel Discussion (Misc queries) 2 August 17th 06 01:21 PM
place data from 1 spreadsheet to another Chester1 Excel Discussion (Misc queries) 1 August 16th 06 01:04 PM
data remaining in place ben simpson Excel Discussion (Misc queries) 1 March 13th 06 09:13 PM


All times are GMT +1. The time now is 05:03 AM.

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"