Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default The IF function but with 3 values

Hi

I have a cell that generates an age in years from a date of birth in
another cell. 1, 2, 3 etc,

The age is displayed in L7

In another cell I need one of three prices based upon that age in
L7

Under age 2 should return a price of 3.50
Aged 2 should return a price of 3.20
And 3 and above should returna price of 2.8

I have tried playing with the IF function but just cannot get it to
work

Hope you can help. Thanks in anticipation

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,574
Default The IF function but with 3 values

=IF(L7<2,3.5,IF(L7=2,3.2,2.8))

Dave
--
A hint to posters: Specific, detailed questions are more likely to be
answered than questions that provide no detail about your problem.


" wrote:

Hi

I have a cell that generates an age in years from a date of birth in
another cell. 1, 2, 3 etc,

The age is displayed in L7

In another cell I need one of three prices based upon that age in
L7

Under age 2 should return a price of 3.50
Aged 2 should return a price of 3.20
And 3 and above should returna price of 2.8

I have tried playing with the IF function but just cannot get it to
work

Hope you can help. Thanks in anticipation


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,101
Default The IF function but with 3 values

=IF(I7<2,"3.5",IF(I7=2,3.2,IF(I7=3,2.8)))

The above will give the answer you want but are you sure your logic is
correct. What happens between 2 and 3?

" wrote:

Hi

I have a cell that generates an age in years from a date of birth in
another cell. 1, 2, 3 etc,

The age is displayed in L7

In another cell I need one of three prices based upon that age in
L7

Under age 2 should return a price of 3.50
Aged 2 should return a price of 3.20
And 3 and above should returna price of 2.8

I have tried playing with the IF function but just cannot get it to
work

Hope you can help. Thanks in anticipation


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 340
Default The IF function but with 3 values

=LOOKUP(L7,{0,3.5;2,3.2;3,2.8})

On Feb 6, 2:19 pm, wrote:
Hi

I have a cell that generates an age in years from a date of birth in
another cell. 1, 2, 3 etc,

The age is displayed in L7

In another cell I need one of three prices based upon that age in
L7

Under age 2 should return a price of 3.50
Aged 2 should return a price of 3.20
And 3 and above should returna price of 2.8

I have tried playing with the IF function but just cannot get it to
work

Hope you can help. Thanks in anticipation





  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default The IF function but with 3 values

Assuming the OP wanted numbers rather than text, the 3.5 should not be
in quotes. If the OP wanted text instead, the other values should be in
quotes.

In article ,
Mike wrote:

=IF(I7<2,"3.5",IF(I7=2,3.2,IF(I7=3,2.8)))

The above will give the answer you want but are you sure your logic is
correct. What happens between 2 and 3?

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
Return Matched Numeric Values across Rows Sam via OfficeKB.com Excel Worksheet Functions 2 January 2nd 07 11:03 PM
Lookup Function Referencing cells, not text values Justin Excel Worksheet Functions 3 November 6th 06 07:30 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
Custom functions calculating time arguments Help Desperate Bill_De Excel Worksheet Functions 12 April 25th 06 02:22 AM
Error Handling #N/A with AVERAGE Function - Average of values in Row Sam via OfficeKB.com Excel Worksheet Functions 13 July 31st 05 03:59 PM


All times are GMT +1. The time now is 07:28 PM.

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

About Us

"It's about Microsoft Excel"