| Author |
calculating a percentage
|
|
| m.salter 2004-11-24, 3:55 pm |
| hi all
i am trying to calculate a total value which includes
17.5 %
i am having trouble doing this, so can some one
please help me
Dim VAT
preCalc = inputbox("Enter the sub total amount",,"100")
'preCalc = (preCalc * 17.50%)
msgbox "Grand total: " &space(3) & (preCalc)
thanks
| |
| Philippe Freddi 2004-11-24, 3:55 pm |
| Hi,
Try
'preCalc = (preCalc * 0.17.5)
'format the result
msgbox "Grand total: " &space(3) & (preCalc) & "%"
Philippe
"m.salter" <salter@lake.org> wrote in message
news:#DEPBpk0EHA.424@TK2MSFTNGP14.phx.gbl...
> hi all
>
> i am trying to calculate a total value which includes
> 17.5 %
>
> i am having trouble doing this, so can some one
> please help me
>
> Dim VAT
> preCalc = inputbox("Enter the sub total amount",,"100")
> 'preCalc = (preCalc * 17.50%)
> msgbox "Grand total: " &space(3) & (preCalc)
>
> thanks
>
>
>
>
| |
| m.salter 2004-11-24, 3:55 pm |
| Thanks Philippe
but that returns an error on line 2 char 26 Expected
from this code
preCalc = inputbox("Enter the sub total amount",,"100")
preCalc = (preCalc * 0.17.5)
msgbox "Grand total: " &space(3) & (preCalc) & "%"
"Philippe Freddi" <philippe@pfreddi.ch> wrote in message
news:%233j$6sk0EHA.2012@TK2MSFTNGP15.phx.gbl...
> Hi,
>
> Try
> 'preCalc = (preCalc * 0.17.5)
> 'format the result
> msgbox "Grand total: " &space(3) & (preCalc) & "%"
>
>
> Philippe
>
> "m.salter" <salter@lake.org> wrote in message
> news:#DEPBpk0EHA.424@TK2MSFTNGP14.phx.gbl...
>
>
| |
|
| Try without the second dot (".") in ...= (preCalc * 0.175)
/PO
"m.salter" <salter@lake.org> wrote in message
news:O$QQM3k0EHA.2804@TK2MSFTNGP15.phx.gbl...
> Thanks Philippe
> but that returns an error on line 2 char 26 Expected
> from this code
>
> preCalc = inputbox("Enter the sub total amount",,"100")
> preCalc = (preCalc * 0.17.5)
> msgbox "Grand total: " &space(3) & (preCalc) & "%"
>
>
> "Philippe Freddi" <philippe@pfreddi.ch> wrote in message
> news:%233j$6sk0EHA.2012@TK2MSFTNGP15.phx.gbl...
>
>
| |
| Evertjan. 2004-11-24, 3:55 pm |
| m.salter wrote on 24 nov 2004 in microsoft.public.scripting.vbscript :
> preCalc = (preCalc * 0.17.5)
>
preCalc = (preCalc * 0.175)
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)
| |
| Evertjan. 2004-11-24, 3:55 pm |
| Evertjan. wrote on 24 nov 2004 in microsoft.public.scripting.vbscript :
> m.salter wrote on 24 nov 2004 in microsoft.public.scripting.vbscript :
>
>
> preCalc = (preCalc * 0.175)
sorry, that is just the VAT
To get the grand total:
preCalc = (preCalc * 1.175)
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress,
but let us keep the discussions in the newsgroup)
| |
| m.salter 2004-11-24, 3:55 pm |
| Excellant PO, it works
thanks very much to all
"PO" <po> wrote in message news:O9mK69k0EHA.1260@TK2MSFTNGP12.phx.gbl...
> Try without the second dot (".") in ...= (preCalc * 0.175)
>
> /PO
>
>
> "m.salter" <salter@lake.org> wrote in message
> news:O$QQM3k0EHA.2804@TK2MSFTNGP15.phx.gbl...
>
>
| |
| m.salter 2004-11-24, 3:55 pm |
| Thanks Evertjan
that works as well
"Evertjan." <exjxw.hannivoort@interxnl.net> wrote in message
news:Xns95ABC1A0E331Deejj99@194.109.133.29...
> Evertjan. wrote on 24 nov 2004 in microsoft.public.scripting.vbscript :
>
>
> sorry, that is just the VAT
>
> To get the grand total:
>
> preCalc = (preCalc * 1.175)
>
>
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress,
> but let us keep the discussions in the newsgroup)
>
|
|
|
|