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 |
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 |
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 |
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 |
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 |
All times are GMT +1. The time now is 03:41 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com