|
-
Jan 6th, 2006, 04:49 PM
#1
Thread Starter
New Member
[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
Last edited by thekeane; Jan 9th, 2006 at 04:32 PM.
-
Jan 8th, 2006, 12:42 PM
#2
Fanatic Member
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
-
Jan 9th, 2006, 04:31 PM
#3
Thread Starter
New Member
[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.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|