Thank you MR. Marc LHi !
A bit unclear what you need, anyway try this :Code:VF = Application.Index(Sheet1.[A1:V10].Formula, Evaluate("ROW(2:10)"), [{2,3,4,5,6,22}])
Do you like it ? So thanks to click on bottom right Like !
Hi MR. HuiThere is a technique shown here:
https://fastexcel.wordpress.com/201...-in-excel-formulas-versus-functions-shootout/
which maybe applicable
HI Mr. Marc;Nope directly !
But if you first create a formula array then another array for value,
so you can replace formula in first array by value of last array …
Hi to all again,
The code line by MR. Marc L is perfect
Now what If I need to do the same but one of the column with formula to be allocated to the array as values and the rest of the columns with formulas?
Is it possible ?
Thank you
Dim vF, vV, vM
With Range("B2:V10")
vF = .Formula
vV = .Value
vM = Application.Index(Application.Choose(Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2), vF, vV), [row(1:9)], Array(1, 2, 3, 4, 21))
End With
Hi Mr. DbaserIt is, but it gets ugly. For example, to return the formulas from the first 4 columns and the values from the last (21st) column, you could use:
Code:Dim vF, vV, vM With Range("B2:V10") vF = .Formula vV = .Value vM = Application.Index(Application.Choose(Array(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2), vF, vV), [row(1:9)], Array(1, 2, 3, 4, 21)) End With
With [B2:V10]
VA = Application.Index(Application.Choose([{1, 1, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1}], _
.Formula, .Value), [ROW(1:9)], [{1,2,3,4,5,21}])
End With
Exactly
Maybe not but you can mod 1 by 2 in the Choose area …