Thread: Frustrated Cook
View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Ron Rosenfeld
 
Posts: n/a
Default Frustrated Cook

On Mon, 21 Nov 2005 06:41:18 +1000, "Wazza McG"
wrote:

Hi,

I have been having trouble trying to work out a formula for the following.

One cup of flour weighs 160g.

If I had 240g of flour I would have 1 1/2 Cups.

Now the hard bit, there are 16 Tablespoons and 48 teaspoons in a cup of
flour.

If I had 270g of flour I want the formula to have an end result of - 1 1/2
C, 2T and 3t - rounded off as close as possible.

In the cup measures, I would only want to use 1/4 C, 1/3 C, 1/2 C, 2/3 C,
3/4 C and 1C and so on. I know 5t should read 1T and 1t, however, getting a
formula to work is beyond me at this stage.

If anyone can help, It would be greatly appreciated.

Regards,

Wazza McG


If you could eliminate those pesky 1/3 and 2/3 cup measures, it would be much
simpler (rounding Tsp to the nearest 1/4 tsp)

With the weight in A2:

Cups B2: =ROUNDDOWN(A2/160*4,0)/4
Tbsp C2: =INT((A2-(B2*160))/10)
Tsp D2: =ROUND((A2-B2*160-C2*10)/3*4,0)/4

If you insist on using those 1/3 and 2/3 cup measures, then the formula for
Cups becomes more complicated, as I believe you would want the most accurate
measu

Cups B2:

=MAX(ROUNDDOWN(A2/160*4,0)/4,ROUNDDOWN(A2/160*3,0)/
IF(ABS(A2-(ROUNDDOWN(A2/160*4,0)/4*160+INT((A2-(
ROUNDDOWN(A2/160*4,0)/4*160))/10)*10+ROUND((A2-
ROUNDDOWN(A2/160*4,0)/4*160-INT((A2-(ROUNDDOWN(
A2/160*4,0)/4*160))/10)*10)/3*4,0)/4*3))<ABS(A2-(ROUNDDOWN(
A2/160*3,0)/3*160+INT((A2-(ROUNDDOWN(A2/160*3,0)/3*160))
/10)*10+ROUND((A2-ROUNDDOWN(A2/160*3,0)/3*160-INT((A2-
(ROUNDDOWN(A2/160*3,0)/3*160))/10)*10)/3*4,0)/4*3)),30,3))


--ron