B2

=TRANSPOSE(ROW(INDIRECT(“1:4″))+{0,4})

B3

=EvalCell(B2,1)

[={1,2,3,4;5,6,7,8}]

B4:E5

=EvalCell(B2)

[with CSE]

Private Sht As Worksheet

Const Tmp = "__Tmp"

Function EvalCell(Target As Range, Optional Formula = False)

Set Sht = Target.Worksheet

Dim AddTmp: AddTmp = "'" & ThisWorkbook.Name & "'!AddTmp"

Run AddTmp & "(" & Target.Address(External:=True) & ")"

Run AddTmp & "(" & Mid(Sht.Names(Tmp).Value, 2) & ")"

If Formula Then EvalCell = Sht.Names(Tmp).Value Else EvalCell = Sht.Evaluate(Tmp)

Run AddTmp & "(NA())"

End Function

Function AddTmp(V)

If IsObject(V) Then V = Application.ConvertFormula(V(1).Formula, xlA1, xlA1, True)

Sht.Names.Add Tmp, V, False

End Function

Const Tmp = "__Tmp"

Function EvalCell(Target As Range, Optional Formula = False)

Set Sht = Target.Worksheet

Dim AddTmp: AddTmp = "'" & ThisWorkbook.Name & "'!AddTmp"

Run AddTmp & "(" & Target.Address(External:=True) & ")"

Run AddTmp & "(" & Mid(Sht.Names(Tmp).Value, 2) & ")"

If Formula Then EvalCell = Sht.Names(Tmp).Value Else EvalCell = Sht.Evaluate(Tmp)

Run AddTmp & "(NA())"

End Function

Function AddTmp(V)

If IsObject(V) Then V = Application.ConvertFormula(V(1).Formula, xlA1, xlA1, True)

Sht.Names.Add Tmp, V, False

End Function

(Note: may need modifications for structured references.)

]]>I see from that that I don’t need the final argument of the MID function, so there’s an efficiency saving. I think I prefer the approach of using var1 to hold the formula string, in case I need to evaluate it again…although I realize now that I needn’t use a Variant to do that, so have changed it to a string. And I should use Mid$ instead of MID. Not that I’ll ever notice the performance gains from these deckchair rearrangements.

]]>Thanks for the link to your site. I’ve never seen it and it has tons of great stuff!

You really need to find a topic for the letter Z. It looks lonely. ]]>

Had the same issue; formatted the cell as text and just typed in a date as 2014-07-11 for 11Nov2014 ]]>

Function F_snb(c00 As Range)

On Error Resume Next

F_snb = Join(Evaluate(Mid(c00.Formula, 2)), ";")

If Err.Number <> 0 Then F_snb = Join(Application.Transpose(Evaluate(Mid(c00.Formula, 2))), ";")

End Function

On Error Resume Next

F_snb = Join(Evaluate(Mid(c00.Formula, 2)), ";")

If Err.Number <> 0 Then F_snb = Join(Application.Transpose(Evaluate(Mid(c00.Formula, 2))), ";")

End Function

http://www.snb-vba.eu/VBA_Fill_combobox_listbox_en.html#L_0

How to fill a combobox/listbox using the method ‘Evaluate’

]]>