I am trying to create an array of all the products that my store sells, but in the list, there are an abundance of blank cells that aren't needed when the matrix is good and done. Is there a way to get rid of these blank cells before I construct it?
For my last project, I did
Range("A:A").Find("").Select
Selection.ClearContents
Selection.Delete Shift:=xlUp
but I don't think that would work for this one because I don't want to mess up the worksheet in any way.
Presently I have this:
Dim iRows as Long
Sheets("PR001C2531380000001").Activate
iRows = Cells(Rows.Count, 1).End(xlUp).Row + CLng(0)
Do While Range("A:A").Find("ITEM-NO").Offset(c + 1, 0) = iRows
c = c + 1
Loop
ReDim PrMat(0 To iRows)
d = 0
For d = 0 To UBound(PrMat())
Do While Range("A:A").Find("ITEM-NO").Offset(d + 1, 0).End(xlUp).Row + CLng(0)
PrMat(d) = Range("A:A").Find("ITEM-NO").Offset(d + 1, 0)
d = d + 1
I am thinking it's not possible, but even some validation that my thinking is off would be great.