Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Output array to Excel blank rows separating groups


I've got an array which I'd like to group while writing it to Excel b
inserting a blank row above (and below) any groups of repeating value
in Col "A". Determining the locations for the bottom blank row i
easy, it's the top row that I'm having a problem with.

Any tips? Here's my test code to replicate what I want to do:



Code
-------------------
Function tester()
Dim IDCount
Dim IDHold
Dim i
IDCount = 0
IDHold = ""
Dim ID
Dim IDS As Variant

ID = ""
IDS = Array("A", "A", "B", "B", "C", "D", "E", "F", "F", "G")

For i = 1 To 10
ID = IDS(i)
'IDCount = IDCount + 1
If ID < IDHold Then
If IDCount 1 Then
'MsgBox "EXTRA ROW INSERTED"
Debug.Print ""
IDCount = 0
End If
End If
Debug.Print "ID: " & ID & " " & "IDHOLD: " & IDHold & " " & "IDCOUNT: " & IDCount
IDHold = ID
IDCount = IDCount + 1
Next i
End Function
-------------------



Thanks,

Rand

--
ghh3r
-----------------------------------------------------------------------
ghh3rd's Profile: http://www.excelforum.com/member.php...fo&userid=3204
View this thread: http://www.excelforum.com/showthread.php?threadid=51797

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
How to create groups of several rows in sheet (excel)? MIB New Users to Excel 2 September 8th 08 02:22 PM
Adding blank rows between groups of similar names Justin Excel Worksheet Functions 2 July 6th 07 07:28 PM
Identifying and separating groups of data. Matt[_32_] Excel Programming 8 July 24th 05 04:21 AM
In Excel my autofilter? is omitting some data rows from output Perplexed Jeff Excel Programming 1 July 5th 05 01:29 PM
Help with 1 x 2 array output jomni[_3_] Excel Programming 3 April 2nd 04 03:49 PM


All times are GMT +1. The time now is 11:01 PM.

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"