Hi Trevor,
I actually came up with a very similar answer, but I appreciate your input.
Regards
Neil
Sub Blankless_Array()
Dim myArray(), myData As Range, Cell_Data As Range, ct As Integer, i As Integer
Set myData = Worksheets(1).Range("d3:h3")
'Copy all data in row and paste values in row3 for array purposes
Range("A2:h2").Select
Selection.Copy
Range("A3").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A3").Select
Application.CutCopyMode = False
ReDim myArray(myData.Count)
ct = 0
For Each Cell_Data In myData
'don't add blanks to array
If Cell_Data <> "" Then
myArray(ct) = Cell_Data
ct = ct + 1
Else:
ct = ct ' + 1
End If
Next Cell_Data
'overwrite range with array data
Range("d3:h3").Value = myArray
End Sub
Bookmarks