LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
XP XP is offline
external usenet poster
 
Posts: 389
Default Man in the middle

I am using Office 2003 on Windows XP.

In code, I need to work out which variable contains the middle value, in
this example, it would be 85. I would guess this needs to be done by
comparing <= and = and sometimes there could be a two or three way tie. In a
tie, it doesn't matter which one is in the middle...but the code needs to
identify which variable has been selected. So in the example, I would need to
know that dVar1 is in the
middle.

Dim dVar1 as Double
Dim dVar2 as Double
Dim dVar3 as Double
dVar1 = Abs(-85)
dVar2 = Abs(95)
dVar3 = Abs(25)

If dVar1 = dVar2 then ... (what next? I can't crack it!)

Do I have to try every combination to work this out? I can't seem to work
out the code to ensure that it always works. Your help is appreciated.

 
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
Separate first name, middle name and last name NoviceUser Excel Worksheet Functions 1 December 18th 09 12:36 AM
Round up-down-or middle widman Excel Discussion (Misc queries) 4 April 27th 06 05:32 PM
how to get the middle name zomex Excel Worksheet Functions 2 December 6th 05 01:26 PM
how to get the middle name zomex Excel Worksheet Functions 1 December 5th 05 10:32 AM
Remove middle initial from "first name middle initial" Justin F. Excel Discussion (Misc queries) 15 September 26th 05 06:13 PM


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