The ROI($) value is the SALE - INVESTMENT.
The ROI(%) value is the (SALE-INVESTMENT)/SALES
If the values are negative they are red and in brackets, but both still show the Minus sign, and the ROI (%) has a leading "Hashmark".
Any solutions, suggestions or alternatives received gratefully as ever![]()
Option Explicit Dim a As Long, f As Long Dim c As Range Dim ws As Worksheet Private Sub CommandButton2_Click() If tboxSPINV <> "" And tboxSPSALES <> "" Then tboxSPROICASH.Value = tboxSPSALES - tboxSPINV If tboxSPROICASH.Value < 0 Then tboxSPROICASH.Value = Format(tboxSPROICASH, "($#,##0.00)") tboxSPROICASH.ForeColor = RGB(255, 0, 0) Else: tboxSPROICASH.Value = Format(tboxSPROICASH, "$#,##0.00)") tboxSPROICASH.ForeColor = RGB(0, 0, 0) End If tboxSPROIPER.Value = (tboxSPSALES - tboxSPINV) / tboxSPSALES If tboxSPROIPER < 0 Then tboxSPROIPER.Value = Format(tboxSPROIPER.Value, "(\#,##0.00%)") tboxSPROIPER.ForeColor = RGB(255, 0, 0) Else: tboxSPROIPER.Value = Format(tboxSPROIPER.Value, "#,##0.00%") tboxSPROIPER.ForeColor = RGB(0, 0, 0) End If End If End Sub Private Sub CommandButton4_Click() Unload Me End Sub
Ochimus











LinkBack URL
About LinkBacks
Register To Reply
Bookmarks