View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default how do i work i pints and gallons

That seems to give a #DIV/0! error if there are any empty cells (or cells
where the number of gallons is zero) in the range.
--
David Biddulph


Mike H wrote:
Hi,

I may have made hard work of this and someone may come up with
something simpler but in the meantime try this ARRAY formula. There
musn't be any blank cells in the range and see below on how to enter
an array formula

=SUM(INT(A1:A10))+MOD(SUM(MOD(A1:A10,INT(A1:A10))) *10,8)/10+INT(SUM(MOD(A1:A10,INT(A1:A10)))*10/8)

This is an array formula which must be entered by pressing
CTRL+Shift+Enter 'and not just Enter. If you do it correctly then
Excel will put curly brackets 'around the formula {}. You can't type
these yourself. If you edit the formula 'you must enter it again with
CTRL+Shift+Enter.


i would like to have a column that works in pints and gallons that
will add up at the bottom.
so if i put in 1.4 (1 being a gallon & .4 being pints) + 2.7 (2
being a gallon & .7 being pints) the answer i need would be 4.3
as there are 8 pints in a gallon

Using Excel 2007