Objective: to let solver do its thing, but after solver runs to have the value in C5 to be rounded down.
Example: After solver runs ("C5" = $3,012.63); I need it to display as ("C5" = $3,012).
The below code works for with the exception of the my attempt in red:
I am using excel 2007.
All help is appreciated!
Example: After solver runs ("C5" = $3,012.63); I need it to display as ("C5" = $3,012).
The below code works for with the exception of the my attempt in red:
Code:
Sub Calc_SingleServDollar()
Application.ScreenUpdating = False
If Error Then GoTo SingleServDollar
''Routine performed on SinglePerDieam tab
With Worksheets("SinglePerDiem")
''Reset Solver Function
Application.Run "SolverReset"
''Executing Solver Function without pulling standard user report
Application.Run "SolverOK", "E5", _
3, _
Range("E4").Value, _
"C5"
''Executing Solver Function without pulling standard user report
Application.Run "SolverSolve", True
Range("C2").Formula = "=NOW()"
'' Message to user declaring the Target Dollars and Optimized Case Rate
MsgBox Prompt:=.Range("B2").Value & " " & .Range("C2").Value & vbLf & vbLf & _
"Target Dollars: " & Format(.Range("E4").Value, "currency") & vbLf & vbLf & _
"Optimized Proposed Rate: " & Format(.Range("C5").Value, "currency"), _
Buttons:=vbOKOnly, _
Title:="APS Pricer: Single Per Diem"
End With
[COLOR=red]Range("C5") = Application.RoundDown(C5, 0)[/COLOR]
Exit Sub
SingleServDollar:
MsgBox "Error with Solver Function being used within Single Service Dollar."
Application.ScreenUpdating = True
End Sub
I am using excel 2007.
All help is appreciated!