Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default IF Function .....

Very sorry - I have posted this in another groupd and have realised
this is in fact the correct place to ask.

I am currently using the IF function to display a score value based
on
age. I am currently using 2 cells with 2 seperate equations for boys
(with age in C5):


=IF($C$5=11,10.6,IF($C$5=12,12.8,IF($C$5=13,15,IF( $C$5=14,17.2,IF($C
$5=15,19.3,IF($C$5=16,20.1,IF($C$5=17,20.9,IF($C$5 =18,21.6))))))))


and girls (with age in B5):


=IF($B$5=11,9,IF($B$5=12,10.6,IF($B$5=13,12.1,IF($ B$5=14,13.7,IF($B
$5=15,15.4,IF($B$5=16,15.8,IF($B$5=17,16.3,IF($B$5 =18,16.7))))))))


I am trying to combine the 2 equations into one, so that the user can
enter age and sex (m or f) and the output will be the appropriate
score.

I am pretty sure that I need to be using the AND / OR functions but
can't seem to crack it. Any help (as always) much appreciated!


Thanks


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default IF Function .....

Rather than have one complex formula to cover boys and girls together,
put those ages and scores in a table somewhere (eg X1:Z8), like this:

11 10.6 9
12 12.8 10.6
13 15 12.1
14 17.2 13.7
15 19.3 15.4
16 20.1 15.8
17 20.9 16.3
18 21.6 16.7

Then if you use B5 for the gender and C5 for the age, you can have a
formula like this:

=IF(B5="m",VLOOKUP(C5,X1:Y8,2),IF(B5="f",VLOOKUP(C 5,X1:Z8,3),""))

Hope this helps.

Pete

On Dec 4, 3:54*pm, wrote:
Very sorry - I have posted this in another groupd and have realised
this is in fact the correct place to ask.

I am currently using the IF function to display a score value based
on
age. I am currently using 2 cells with 2 seperate equations for boys
(with age in C5):

=IF($C$5=11,10.6,IF($C$5=12,12.8,IF($C$5=13,15,IF( $C$5=14,17.2,IF($C
$5=15,19.3,IF($C$5=16,20.1,IF($C$5=17,20.9,IF($C$5 =18,21.6))))))))

and girls (with age in B5):

=IF($B$5=11,9,IF($B$5=12,10.6,IF($B$5=13,12.1,IF($ B$5=14,13.7,IF($B
$5=15,15.4,IF($B$5=16,15.8,IF($B$5=17,16.3,IF($B$5 =18,16.7))))))))

I am trying to combine the 2 equations into one, so that the user can
enter age and sex (m or f) and the output will be the appropriate
score.

I am pretty sure that I need to be using the AND / OR functions but
can't seem to crack it. Any help (as always) much appreciated!

Thanks


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 13
Default IF Function .....

AH!! Perfect - Thanks!!!!!
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default IF Function .....

You're welcome - thanks for taking the trouble to feed back.

Pete

On Dec 4, 5:14*pm, wrote:
AH!! Perfect - Thanks!!!!!


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
copy of excel file not showing formulal/function in the function b oaallam Excel Discussion (Misc queries) 4 September 6th 07 01:20 PM
LINKEDRANGE function - a complement to the PULL function (for getting values from a closed workbook) [email protected] Excel Worksheet Functions 0 September 5th 06 03:44 PM
Offset function with nested match function not finding host ss. MKunert Excel Worksheet Functions 1 March 21st 06 10:46 PM
Emulate Index/Match combo function w/ VBA custom function Spencer Hutton Excel Worksheet Functions 2 May 2nd 05 05:26 PM
Nested IF Function, Date Comparing, and NetworkDays Function carl Excel Worksheet Functions 2 December 29th 04 09:57 PM


All times are GMT +1. The time now is 09:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"