Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
Maintaining integrity while referencing data
I have a spreadsheet which references sequential entries from sheet 2
into a pre-arragned repeating row grouping in sheet 1. I have been asked to alter sheet 1 by inserting a new row into grouping. Is there an easy way to perform this? (There are thousands of line entries.) a b =Sheet2!C1 a b =sheet2!C2 ---------------- to ------------------------------ a b c =Sheet2!C1 a b c =sheet2!C2 Thanks in advance, -- Buck Stop |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
Maintaining integrity while referencing data
Try the macro Sub insertRow() With ActiveSheet lastrow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = lastrow To 2 Step -3 Cells(i, 1).EntireRow.Insert Next i End With End Sub Procedure to run the macro Open Excel and open the workbook/worksheet with your data Press ALT-F11 to open VB Editor Choose Insert-Module Paste the code Press F5 Swich back to the workbook and verify the data ... ------------------------------------- Pl. click ''''Yes'''' if this was helpful... "TheBuckStoppedHere" wrote: I have a spreadsheet which references sequential entries from sheet 2 into a pre-arragned repeating row grouping in sheet 1. I have been asked to alter sheet 1 by inserting a new row into grouping. Is there an easy way to perform this? (There are thousands of line entries.) a b =Sheet2!C1 a b =sheet2!C2 ---------------- to ------------------------------ a b c =Sheet2!C1 a b c =sheet2!C2 Thanks in advance, -- Buck Stop |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
Maintaining integrity while referencing data
Thanks, Sheeloo!
I'll have to brush up on macros, but I can see your logic. Thanks for pointing me in the right direction This should save hours. -- Buck Stop "Sheeloo" wrote: Try the macro Sub insertRow() With ActiveSheet lastrow = .Cells(.Rows.Count, "A").End(xlUp).Row For i = lastrow To 2 Step -3 Cells(i, 1).EntireRow.Insert Next i End With End Sub Procedure to run the macro Open Excel and open the workbook/worksheet with your data Press ALT-F11 to open VB Editor Choose Insert-Module Paste the code Press F5 Swich back to the workbook and verify the data ... ------------------------------------- Pl. click ''''Yes'''' if this was helpful... "TheBuckStoppedHere" wrote: I have a spreadsheet which references sequential entries from sheet 2 into a pre-arragned repeating row grouping in sheet 1. I have been asked to alter sheet 1 by inserting a new row into grouping. Is there an easy way to perform this? (There are thousands of line entries.) a b =Sheet2!C1 a b =sheet2!C2 ---------------- to ------------------------------ a b c =Sheet2!C1 a b c =sheet2!C2 Thanks in advance, -- Buck Stop |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Keep integrity of pasted links when data is later sorted | Excel Worksheet Functions | |||
Sorting and maintaining formula integrity | Excel Worksheet Functions | |||
Data Integrity Error Message | Excel Discussion (Misc queries) | |||
data formatting integrity | Excel Discussion (Misc queries) | |||
Preserving data integrity in linked workbooks | Excel Discussion (Misc queries) |