[RESOLVED] Find all Cells in a Range in Excel
I'm trying to dynamically create a table of results using the solver "By changing cells" information. If you use a the SolverGet function you can get a string that contains all of the cells that the user had selected.
I have parsed the string down to begin to create the table but was wondering if there is an easier way to get a list of all the cells in a range.
For example the user enters
Sheet1!B2:C3, Sheet1!D6, Sheet1!E5
So is there an easy way to find out that B2:C3 is really B2,B3,C2,C3 so I can put that as a column header.
Thanks
Re: Find all Cells in a Range in Excel
This might help:
VB Code:
Sub ParseInput(ParamArray arglist() As Variant)
Dim arg As Variant
Dim i As Integer
Dim txt As String
For Each arg In arglist
For i = 1 To arg.Cells.Count
txt = arg(i).Address
'blah, blah, blah
Next i
Next arg
End Sub
[Resolved] Find all Cells in a Range in Excel
Thanks, just what i was looking for. Modified it a little bit to use a two dimensional array, but pointed me in the right direction.