And If Statement Q

J

John

I am trying to construct a formula that will do some calculations if certain
values are in certain cells

The different types of situations are as follows:

If Cell G277 = Grams AND Cell D277 = Kilos then Formula should be
((F277/1000)/H277)
If Cell G277 = Grams AND Cell D277 = Grams then Formula should be
((F277/1)/H277)
If Cell G277 = MilliLitres AND Cell D277 = Litres then Formula should be
((F277/1000)/H277)
If Cell G277 = MilliLitres AND Cell D277 = MilliLitres then Formula should
be ((F277/1)/H277)
If Cell G277 = Units AND Cell D277 = Units then Formula should be
((F277/1)/H277)

Thanks
 
F

Frank Kabel

Hi John
try the following formula
=(F2777(1+999*((D277="Kilos")+(D277="Litres"))))/(H277/(1+999*((G277="K
ilos")+(G277="Litres")))
 
J

John

Thanks again Frank




Frank Kabel said:
Hi John
try the following formula
=(F2777(1+999*((D277="Kilos")+(D277="Litres"))))/(H277/(1+999*((G277="K
ilos")+(G277="Litres")))
 
F

Frank Kabel

Hi
looking at your examples this should not matter if you only have the
combination of
1. Kilos/grams or
2. Litres/mililitres or
3. Units

and do not mix these units than the formula should work. It just
divides all 'Kilos' and 'Litres' by 1000 (and all other units by 1)
 
R

RagDyeR

What am I missing Frank?

The OP says thanks, so something must work ... but where are the other
conditions, like "Units" and "Millilitres"?
And what is <<< =(F277(1+999 >>> ???

--

Regards,

RD
--------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
--------------------------------------------------------------------

Hi John
try the following formula
=(F2777(1+999*((D277="Kilos")+(D277="Litres"))))/(H277/(1+999*((G277="K
ilos")+(G277="Litres")))
 
F

Frank Kabel

Hi RD
if I understood the conditions of the OP correctly he wants to divide
to values which can have different units/dimensions. e.g. they can be
in 'Litres' or 'mililitres'
So my formula does the following:
- if the unit is Litre (or Kilo) it divides the associated value by
1000 (1+999*(....)). If both values are in Litres (or Kilos) both
values are divided by 1000 (so the end result is still o.k.)
- Based on his example the condition 'Unit' does not require a division
by 1000
 
R

RagDyeR

Darned good formula Frank.
I couldn't get my head around the typo at first, but when I figured that 7
should be a "/", then the light bulb came on.
--

Regards,

RD
--------------------------------------------------------------------
Please keep all correspondence within the Group, so all may benefit !
--------------------------------------------------------------------

Hi RD
if I understood the conditions of the OP correctly he wants to divide
to values which can have different units/dimensions. e.g. they can be
in 'Litres' or 'mililitres'
So my formula does the following:
- if the unit is Litre (or Kilo) it divides the associated value by
1000 (1+999*(....)). If both values are in Litres (or Kilos) both
values are divided by 1000 (so the end result is still o.k.)
- Based on his example the condition 'Unit' does not require a division
by 1000
 
J

John

Thnaks Frank that explaation helped.


Frank Kabel said:
Hi RD
if I understood the conditions of the OP correctly he wants to divide
to values which can have different units/dimensions. e.g. they can be
in 'Litres' or 'mililitres'
So my formula does the following:
- if the unit is Litre (or Kilo) it divides the associated value by
1000 (1+999*(....)). If both values are in Litres (or Kilos) both
values are divided by 1000 (so the end result is still o.k.)
- Based on his example the condition 'Unit' does not require a division
by 1000
 

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