Hi,
I am trying to format a MsgBox string created from and array of cells. There are 3 columns in the cell range the 3rd of which have a % format. Msgbox writes the string as a decimal. Can anyone help with converting the range C2:C6 to a percentage the same as the source. I was trying to use the FORMAT() function without success
Cheers
>
Source data:
<colgroup><col><col span="2"></colgroup><tbody>
</tbody>
I am trying to format a MsgBox string created from and array of cells. There are 3 columns in the cell range the 3rd of which have a % format. Msgbox writes the string as a decimal. Can anyone help with converting the range C2:C6 to a percentage the same as the source. I was trying to use the FORMAT() function without success
Cheers
>
Source data:
1 | 10 | 0% |
11 | 24 | 10% |
25 | 49 | 35% |
50 | 99 | 40% |
100 | 999 | 50% |
<colgroup><col><col span="2"></colgroup><tbody>
</tbody>
Code:
Sub MsgBoxDiscount()
'Display the Discount Table in a popup
MsgString = Join(Evaluate("TRANSPOSE('Discounts'!A2:A6 & """ & vbTab & """ & 'Discounts'!B2:B6 & """ & vbTab & vbTab & """ & 'Discounts'!C2:C6 )"), vbNewLine)
MsgBox "Volume Range" & vbTab & "Discount" & vbCr & MsgString, , "Volume Discount Table"
End Sub