kIc,
Thanks for your comments.
I like your approach, but as a general practice will not
write code that won't run in xl97 (assigning to arrays).
And yes, I have also discovered that one cannot assume
writing a Variant(containing an array) or Arrays directly
to a range is faster then plunking data directly in each cell.
If I was starting over with it, I believe that filling an index
row and sorting would be the way to go.
Regards,
Jim Cone
San Francisco, USA
Jim,
I love your select case for the verification process, a gem!
BUT:
Using FormulaR1C1 iso FormulaLocal will screwup fewer formulas
(personally i avoid all Local string like the plague, more important
to use r1c1)
FWIW:
Textually confusing:
vbYes to Reverse Column data
to the programmer means flip the data in each column,
but to a user "Yes to Flip ROWS" is clearer.
No to flip COLUMNS" is probably clearer.
When a user breaks you should finish flipping at least the current
column. (I'd use an intermediate array(1 to rows,1 to 1) to cache the
"writedata" and avoid writing to single ranges
Following code uses 2 arrays
and can be copied into your routine...
(drawback: the writing part may be unresponsive)
Dim DataArray(), lRow&, lCol&
Application.StatusBar = "Reading"
DataArray = Rng.FormulaR1C1
ReDim CellArray(1 To Rws, 1 To Cols)
Application.StatusBar = "Flipping"
For lRow = 1 To Rws
For lCol = 1 To Cols
If Response = vbNo Then
CellArray(lRow, Cols + 1 - lCol) = DataArray(lRow, lCol)
Else
CellArray(Rws + 1 - lRow, lCol) = DataArray(lRow, lCol)
End If
Next
Next
Application.StatusBar = "Writing Flipped data"
Rng.FormulaR1C1 = CellArray
--
keepITcool
|
www.XLsupport.com | keepITcool chello nl | amsterdam
Jim Cone wrote :