Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Michael NYC
 
Posts: n/a
Default return a value based on a range

I want to return a value (a number) based on a number in anotehr cell that is
within a range of numbers using the IF function. For example: A2=$75 if B2=5,
A2=$100 if B2=10, A2=$150 if B2=15.

Can someone please give me the correct syntax, I am really lost!

  #3   Report Post  
Roger Govier
 
Posts: n/a
Default

Hi Michael

Try entering in A2
=IF(B2=15,150,IF(B2=10,100,IF(B2=5,75,"")))
This assumes that you want nothing in cell A2 if B2 is not equal to any of
those values.

Or without IF statements
=75*(B2=5)+25*(B2=10)+75*(B2=15)
The formula will return 0 if B2 does not equal 5,10 or 15

Regards

Roger Govier


Michael NYC wrote:
I want to return a value (a number) based on a number in anotehr cell that is
within a range of numbers using the IF function. For example: A2=$75 if B2=5,
A2=$100 if B2=10, A2=$150 if B2=15.

Can someone please give me the correct syntax, I am really lost!

  #4   Report Post  
Roger Govier
 
Posts: n/a
Default

Correction
That should have read
Or without IF statements
=75*(B2=5)+25*(B2=10)+150*(B2=15)

Regards

Roger Govier


Roger Govier wrote:
Hi Michael

Try entering in A2
=IF(B2=15,150,IF(B2=10,100,IF(B2=5,75,"")))
This assumes that you want nothing in cell A2 if B2 is not equal to any
of those values.

Or without IF statements
=75*(B2=5)+25*(B2=10)+75*(B2=15)
The formula will return 0 if B2 does not equal 5,10 or 15

Regards

Roger Govier


Michael NYC wrote:

I want to return a value (a number) based on a number in anotehr cell
that is within a range of numbers using the IF function. For example:
A2=$75 if B2=5, A2=$100 if B2=10, A2=$150 if B2=15.

Can someone please give me the correct syntax, I am really lost!

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
How do I sum a range which includes the "#N/A" VLOOKUP return valu Sailor Excel Worksheet Functions 6 May 9th 05 08:46 AM
I want to return a value based on the status of a check box. If . JROD Excel Worksheet Functions 1 April 4th 05 08:18 PM
Can you average data in 1 column based on a range of values in another? kman24 Excel Worksheet Functions 2 November 17th 04 02:09 PM
Returning a Value to a Cell Based on a Range of Uncertain Size amc422 Excel Worksheet Functions 7 November 14th 04 03:03 PM
Lookup with search range start based on position of last blank lin rcmodelr Excel Worksheet Functions 0 November 14th 04 06:32 AM


All times are GMT +1. The time now is 07:21 AM.

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"