Home All Groups Group Topic Archive Search About

Math question: Based on excel

Author
18 Aug 2006 5:10 AM
MarkusJNZ
Hi, I have to do some math processing based on some sums in an excel
spreadsheet.

I just need the VB.NET equivalent..

One of the cells (Lets call it cell G3) contains a percentage e.g. 3.2%

How can I do the math against the cell?

for example

sum = (150 - 30) / (1 +(G3))

TIA
MarkusJ

================================
Ignore below
jhgklioplsjdujehhrejhjrejhekdsdlkasdlerksdksd
================================

Author
18 Aug 2006 5:21 AM
William Foster
Tia,

You just need to call a variable rather than a cell, so in Excel you say
G3, in VB you would say Percentage_Value;

i.e.

Dim Percentage_Value as Integer
Dim Total_Value as Integer

Total_Value = (150 - 30) / (1 + Percentage_Value)

I hope this helps !

Yours sincerely,

William Foster

*** Sent via Developersdex http://www.developersdex.com ***
Author
18 Aug 2006 5:56 AM
MarkusJNZ
Thanks!

William Foster wrote:
Show quoteHide quote
> Tia,
>
> You just need to call a variable rather than a cell, so in Excel you say
> G3, in VB you would say Percentage_Value;
>
> i.e.
>
> Dim Percentage_Value as Integer
> Dim Total_Value as Integer
>
> Total_Value = (150 - 30) / (1 + Percentage_Value)
>
> I hope this helps !
>
> Yours sincerely,
>
> William Foster
>
> *** Sent via Developersdex http://www.developersdex.com ***