Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 248
Default 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   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default 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
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
Keep integrity of pasted links when data is later sorted John in Venice Excel Worksheet Functions 1 December 17th 08 02:51 AM
Sorting and maintaining formula integrity Ed[_4_] Excel Worksheet Functions 5 September 16th 08 07:11 AM
Data Integrity Error Message simmerdown Excel Discussion (Misc queries) 0 May 16th 08 03:45 PM
data formatting integrity [email protected] Excel Discussion (Misc queries) 1 April 11th 07 07:02 PM
Preserving data integrity in linked workbooks KG Excel Discussion (Misc queries) 1 February 18th 05 12:45 AM


All times are GMT +1. The time now is 12:24 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"