From: Dave Peterson on
I would use multiple columns.

The first would be for the Qty -- no units here.
The second would be the units (g or o, or Grams or Ounces, or whatever you
want).
The third would translate/copy to grams.
The fourth would translate/copy to ounces.

Qty Unit Grams Ounces
3 g 3
10 o 0.352739619

The formula in C2: =IF(B2="g",A2,A2/0.0352739619)
The formula in D2: =IF(B2="o",A2,A2*0.0352739619)



Quin wrote:
>
> I am creating my own food log in Excel. When I look up different foods some
> are listed in grams, others in ounces. With two columns, one with a heading
> of “Ounces” and another with a heading of “Grams” I would like to be able to
> list one and calculate the other. Both columns can not have formulas that
> relate to each other, so I am wondering if there is a neat way to accomplish
> this.
>
> 1 gram = 0.0352739619 ounces
>
> Quin

--

Dave Peterson
From: Quin on
Chip,

Your solution is exactly what I wanted. I tried it out and it worked
perfectly. I will want to come back to this post to see if I can understand
the VBA. What a wonderful talent to have, writing VBA to improve performance
of a work sheet. Thanks for taking the time to write the code.

Dave, your solution was also appreciated and would work well for someone
that gets stuck implementing the VBA.

Quin
From: p45cal on

Quin;694326 Wrote:
>
Chip,
> Your solution is exactly what I wanted.
> [snip]
> Dave, your solution was also appreciated [snip]
> Quin



Oh, well, last and least.. oh no wait, not even last!


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: 558
View this thread: http://www.thecodecage.com/forumz/showthread.php?t=194035

http://www.thecodecage.com/forumz

First  |  Prev  | 
Pages: 1 2
Prev: Data summary
Next: Error when Saving a Workspace