View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Jacob Skaria Jacob Skaria is offline
external usenet poster
 
Posts: 8,520
Default 16 diffetent if functions for 2 criteria

Post your conditions; there is much better way to do this.

You can have a solution with the current arrangment using VBA..

If this post helps click Yes
---------------
Jacob Skaria


"Andy" wrote:

Can't get that to work... the result is a formula. Maybe this will better
explain what I need. If Gender Column is "M" and age column is "5" then I
need the result of the formulaA. If Gender Column is "M" and age column is
"6" then I need the result of formulaB, etc.

In sheet 2 I have a table that has the corresponding formula for gender and
age similiar to the one as follows:

Gender Column Age Column Formula
M 5
=IF(M227.9,"Overweight",IF(M223...
M 6
=IF(M228,"Overweight",IF(M223...
M 7
=IF(M229,"Overweight",IF(M223...
M 8
=IF(M227.9,"Overweight",IF(M223...
F 5
=IF(M228,"Overweight",IF(M223...
F 6
=IF(M229,"Overweight",IF(M223...
F 7
=IF(M230,"Overweight",IF(M223...





"Jacob Skaria" wrote:

Andy

Instead of 16 different if functions..you can have a table such as below in
Sheet2. and use a VLOOKUP() MATCH() formula to get the desired results

In Sheet1 try the below formula
=VLOOKUP(age,Sheet2!A1:C10,MATCH(boy/girl,Sheet2!A1:C1,0),0)

OR
=VLOOKUP(5,Sheet2!$A$1:$C$10,MATCH("Boy",Sheet2!$A $1:$C$1,0),0)
which will lookup Boy with Age5 and return the corresponding value from the
Sheet2 table. for the above formula it will return x1 or what ever in that
cell...

Col A Col B Col C
Age Boy Girl
5 x1 y1
6 x2 y2
7 x3 y3
8 x4 y4
9 x5 y5
10 x6 y6

If this post helps click Yes
---------------
Jacob Skaria


"Andy" wrote:

I am using excel to calculate BMI for children. I have 16 different if
functions entered and want to set a criteria for using each function.
Basically I want to use one formula for 5 year old boys, another for 5 yr.
old girls, one for 6 year old boys, and another for 6 year old girls, etc. I
have the formulas in a different sheet. I've tried countifs but I can't seem
to get that to work. Example below:
A B C D E
F G
Name Gender Age Height Weight BMI Category