Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Referencing repeating non-consecutive rows

With offset being a volatile function this will degrade the perfomance
(possibly substantially since there will be thousands of these). Volatile
means that the function will recalculate every time a calculation runs, not
just when one of it's dependant cells change. This can be a big drain on
resources. If it was me I would be more inclined to use a macro to just
insert blank rows every two rows.

Sub InsertLines()
Dim wks As Worksheet
Dim rng As Range
Set wks = ActiveSheet

With wks
Set rng = .Range("A3")
Do While Not IsEmpty(rng.Value)
rng.EntireRow.Insert
Set rng = rng.Offset(2, 0)
Loop
End With
End Sub

--
HTH...

Jim Thomlinson


"Ikaabod" wrote:


One way, if you're willing to add a new column, is to simply put 0 for
B1:B3 then make B4 formula =B1+1 and copy B4 down as far as needed.

Then in A1 formula =OFFSET(Sheet2!A1,-B1,0)
in A2 formula =OFFSET(Sheet2!A2,-B2,0)
leave A3 blank
copy A1:A3 down as far as needed.


--
Ikaabod
------------------------------------------------------------------------
Ikaabod's Profile: http://www.excelforum.com/member.php...o&userid=33371
View this thread: http://www.excelforum.com/showthread...hreadid=535003


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
Formula from consecutive rows to alternate rows? Neville Bailey[_2_] Excel Discussion (Misc queries) 2 March 25th 10 01:58 PM
Transposing data from consecutive rows into non-consecutive rows econ Excel Discussion (Misc queries) 0 March 10th 08 07:24 PM
Referencing A Non Consecutive Range? RayportingMonkey Excel Discussion (Misc queries) 3 September 3rd 07 06:06 PM
Inserting multiple rows in excel with data in consecutive rows technotronic Excel Programming 2 October 20th 05 03:12 PM
Selecting consecutive rows in VBA Victor H Excel Programming 6 April 28th 04 09:34 PM


All times are GMT +1. The time now is 09:53 AM.

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

About Us

"It's about Microsoft Excel"