How would you go about getting all the cells within say, Column B (even though, glancing at it you can clearly tell it's 31, or 10, or 1)?
How would you go about getting all the cells within say, Column B (even though, glancing at it you can clearly tell it's 31, or 10, or 1)?
Not real sure what you're asking, but try a loop to fill an array will the addresses of cells in the column that are not blank. For instance:[VBA]Sub FillArray()
Dim c as Range
Dim CellArray
For Each c In Sheet1.Columns("B")
If
[/VBA]
My mistake.[VBA]Sub FillArray()[/VBA]
Dim c As Range
Dim CellArray
ReDim CellArray(0)
For Each c In Sheet1.Columns("B")
If c <> vbNullString Then
CellArray(Ubound(CellArray)) = c.Address
ReDim Preserve CellArray(Ubound(CellArray) + 1)
End If
Next
Onlines, please describe exactly what it is you need. From what you've posted we cannot give you a solution. Perhaps describe an example, or better yet your data, and what you are trying to achieve with it (or the desired results, preferably both).
Regards, Zack Barresse
Check out the KB! :|: BOARD TAGS: WHAT ARE THEY AND HOW DO I USE THEM
What is a Microsoft MVP? | Free Microsoft Courses | My Book on Excel Tables
You want only non-blank cells?