Question: ```
Dim myText As String
myText= Range("a3").Text

```

Returns the formatted value in cell A3, but 

```
myText= Range("a3:c7").Text

```

gives me an error. 

How do I get strings representing formatted values from a multi-cell range, while preserving the number format? i.e. the format of the output text would be the same as if copy-pasting from the range to a text editor.

Answer: 
This is a modified version of one of the post here and it worked for me.

```
    Function Range2Text(ByVal my_range As Range) As String
        Dim i As Integer, j As Integer
        Dim v1 As Variant
        Dim Txt As String

        v1 = my_range
        For i = 1 To UBound(v1)
            For j = 1 To UBound(v1, 2)
                Txt = Txt & v1(i, j)
            Next j
            Txt = Txt & vbCrLf
        Next i

        Range2Text = Txt
    End Function

```
```
dim i as integer, j as integer
Dim v1 as variant

v1=range("a3:c7")

for i=1 to ubound(v1)
  for j=1 to ubound(v1,2)
    debug.print v1(i,j)
  next j
next i

```