Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
ADK ADK is offline
external usenet poster
 
Posts: 89
Default which function can get the desired result?

Is there a function for this:

example:

cell B1 = 115
cell B2 = 120
cell B3 = 200

B1 thru B3 are variables that will change based on user input.
I want cell B4 to equal "CC" if B1 is closer to B2, but if B1 is closer to
B3 than B2, B4 will equal "C"

Any function(s) that can get this result?

Thanks


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 37
Default which function can get the desired result?

Hi try

=IF(B3-B1B2-B1,"C","CC")

--
Regards,

Sebation.G
"ADK" ...
Is there a function for this:

example:

cell B1 = 115
cell B2 = 120
cell B3 = 200

B1 thru B3 are variables that will change based on user input.
I want cell B4 to equal "CC" if B1 is closer to B2, but if B1 is closer to
B3 than B2, B4 will equal "C"

Any function(s) that can get this result?

Thanks




  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default which function can get the desired result?

=IF(ABS(B2-B1)<ABS(B3-B1),"CC","C")


"ADK" wrote:

Is there a function for this:

example:

cell B1 = 115
cell B2 = 120
cell B3 = 200

B1 thru B3 are variables that will change based on user input.
I want cell B4 to equal "CC" if B1 is closer to B2, but if B1 is closer to
B3 than B2, B4 will equal "C"

Any function(s) that can get this result?

Thanks



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default which function can get the desired result?

=IF(ABS(B1-B2)<ABS(B1-B3),"CC","C")

You haven't said what you want as an output if B1 is equidistant from B2 and
B3.
--
David Biddulph

"ADK" wrote in message
...
Is there a function for this:

example:

cell B1 = 115
cell B2 = 120
cell B3 = 200

B1 thru B3 are variables that will change based on user input.
I want cell B4 to equal "CC" if B1 is closer to B2, but if B1 is closer to
B3 than B2, B4 will equal "C"

Any function(s) that can get this result?

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
IRR desired return izbix Excel Worksheet Functions 3 May 3rd 07 06:47 AM
Can not get function result Jenny Excel Discussion (Misc queries) 3 March 14th 07 01:05 PM
HOW TO GET A DESIRED 'SUMIF' RESULT FROM A FILTERED DATA ABDUL RAHMAN Excel Worksheet Functions 1 August 2nd 06 03:05 PM
Simplicity is Desired natei6 Excel Worksheet Functions 8 April 11th 06 07:10 AM
function based on result of same function GolfGal Excel Discussion (Misc queries) 1 April 6th 05 08:03 PM


All times are GMT +1. The time now is 05:55 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"