, - . , = LSet. RSet. , , , , .
:
Private Function ToColumns(layer As Long, percent As Long, xs As Long, attach As Double, _
exhaust As Double) As String
Dim col1 As String * 1 'Change the widths here to adjust your columns.
Dim col2 As String * 3
Dim col3 As String * 3
Dim col4 As String * 5
Dim col5 As String * 5
RSet col1 = layer
RSet col2 = percent
RSet col3 = xs
RSet col4 = Format$(attach, "#.##")
RSet col5 = Format$(exhaust, "#.##")
ToColumns = "Layer " & col1 & ":" & _
col2 & " xs " & _
col3 & " attaches at " & _
col4 & "m and exhausts at " & _
col5 & "m"
End Function
:
Debug.Print ToColumns(1, 25, 50, 8.16, 10.4)
Debug.Print ToColumns(2, 100, 75, 10.4, 20.15)
:
Layer 1: 25 xs 50 attaches at 8.16m and exhausts at 10.4m
Layer 2:100 xs 75 attaches at 10.4m and exhausts at 20.15m
, , , , .