Advanced calculations in tables--Question 2

D

DeeDeeCee

On the Invoice Template I have, there is a column showing the number of
hours worked on a given day. I know I can use a formula like =sum(C1:C7), if
I have exactly 7 days worked. But the number of days on a bill varies, and
often I add lots of rows to the bill, so the column length can vary from 3 to
20. Still, I'd like to have a formula in my template that simply adds up all
the cells above the formula, regardless of how many there end up being. Is
there any such thing? Thanks.

ddc
 
J

Jay Freedman

On the Invoice Template I have, there is a column showing the number of
hours worked on a given day. I know I can use a formula like =sum(C1:C7), if
I have exactly 7 days worked. But the number of days on a bill varies, and
often I add lots of rows to the bill, so the column length can vary from 3 to
20. Still, I'd like to have a formula in my template that simply adds up all
the cells above the formula, regardless of how many there end up being. Is
there any such thing? Thanks.

ddc

You can use the formula =SUM(ABOVE). But be aware of a few possible
problems with that, as described in
http://www.word.mvps.org/FAQs/AppErrors/SumAboveIncorrect.htm.
 
D

DeeDeeCee

Thanks, Mr. Pod. Your site is truly great, and I've saved both the document
To see how to do a wide range of other calculations in Word, check out my Word Field Maths Tutorial, at:
http://www.wopr.com/index.php?showtopic=365442
or
http://www.gmayor.com/downloads.htm#Third_party


--
Cheers
macropod
[Microsoft MVP - Word]


DeeDeeCee said:
On the Invoice Template I have, there is a column showing the number of
hours worked on a given day. I know I can use a formula like =sum(C1:C7), if
I have exactly 7 days worked. But the number of days on a bill varies, and
often I add lots of rows to the bill, so the column length can vary from 3 to
20. Still, I'd like to have a formula in my template that simply adds up all
the cells above the formula, regardless of how many there end up being. Is
there any such thing? Thanks.

ddc
 
S

Samy

Hi Macropod, what an awesome doc need to know how I can round down a decimal
point my formula is SUM(ABOVE)*.14 amd I need to round down if the result is
under 0.05. All the examples I have seen and tried round to a full number.

Thanks Sam

macropod said:
To see how to do a wide range of other calculations in Word, check out my Word Field Maths Tutorial, at:
http://www.wopr.com/index.php?showtopic=365442
or
http://www.gmayor.com/downloads.htm#Third_party


--
Cheers
macropod
[Microsoft MVP - Word]


DeeDeeCee said:
On the Invoice Template I have, there is a column showing the number of
hours worked on a given day. I know I can use a formula like =sum(C1:C7), if
I have exactly 7 days worked. But the number of days on a bill varies, and
often I add lots of rows to the bill, so the column length can vary from 3 to
20. Still, I'd like to have a formula in my template that simply adds up all
the cells above the formula, regardless of how many there end up being. Is
there any such thing? Thanks.

ddc
 
M

macropod

Hi Sammy,

Perhaps the simplest way is to divide the number by the precision you require, before getting the integer value, then multiply the
integer value by that same precision afterwards. For example:
{=INT(SUM(5.53244,6.67432,7.75021)/0.05)*0.05 \# 0.00000}
returns 19.95, whereas the unrounded value is 19.95697

--
Cheers
macropod
[Microsoft MVP - Word]


Samy said:
Hi Macropod, what an awesome doc need to know how I can round down a decimal
point my formula is SUM(ABOVE)*.14 amd I need to round down if the result is
under 0.05. All the examples I have seen and tried round to a full number.

Thanks Sam

macropod said:
To see how to do a wide range of other calculations in Word, check out my Word Field Maths Tutorial, at:
http://www.wopr.com/index.php?showtopic=365442
or
http://www.gmayor.com/downloads.htm#Third_party


--
Cheers
macropod
[Microsoft MVP - Word]


DeeDeeCee said:
On the Invoice Template I have, there is a column showing the number of
hours worked on a given day. I know I can use a formula like =sum(C1:C7), if
I have exactly 7 days worked. But the number of days on a bill varies, and
often I add lots of rows to the bill, so the column length can vary from 3 to
20. Still, I'd like to have a formula in my template that simply adds up all
the cells above the formula, regardless of how many there end up being. Is
there any such thing? Thanks.

ddc
 
S

Samy

Thanks will give that a shot.

macropod said:
Hi Sammy,

Perhaps the simplest way is to divide the number by the precision you require, before getting the integer value, then multiply the
integer value by that same precision afterwards. For example:
{=INT(SUM(5.53244,6.67432,7.75021)/0.05)*0.05 \# 0.00000}
returns 19.95, whereas the unrounded value is 19.95697

--
Cheers
macropod
[Microsoft MVP - Word]


Samy said:
Hi Macropod, what an awesome doc need to know how I can round down a decimal
point my formula is SUM(ABOVE)*.14 amd I need to round down if the result is
under 0.05. All the examples I have seen and tried round to a full number.

Thanks Sam

macropod said:
To see how to do a wide range of other calculations in Word, check out my Word Field Maths Tutorial, at:
http://www.wopr.com/index.php?showtopic=365442
or
http://www.gmayor.com/downloads.htm#Third_party


--
Cheers
macropod
[Microsoft MVP - Word]



On the Invoice Template I have, there is a column showing the number of
hours worked on a given day. I know I can use a formula like =sum(C1:C7), if
I have exactly 7 days worked. But the number of days on a bill varies, and
often I add lots of rows to the bill, so the column length can vary from 3 to
20. Still, I'd like to have a formula in my template that simply adds up all
the cells above the formula, regardless of how many there end up being. Is
there any such thing? Thanks.

ddc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top