#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default Hi to Low

Hi Group,

I have 4 varaibles, to keep it simple:
a=2
b=1
c=5
d=0

I am looking for code that will rank them largest to smallest. It was much
harder to accomplish than I thought it would be. I have started with
If a b And a c And a d Then
FirstLarge = a
If b c And b d Then
SecondLarge = c
etc.

But I thought someone might have thought this through already. Anyne done
this?

Thanks,
--
David
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 464
Default Hi to Low

Use the RANK function. Other Functions that maybe of use a SMALL & LARGE.



--
Regards
Dave Hawley
www.ozgrid.com
"David" wrote in message
...
Hi Group,

I have 4 varaibles, to keep it simple:
a=2
b=1
c=5
d=0

I am looking for code that will rank them largest to smallest. It was much
harder to accomplish than I thought it would be. I have started with
If a b And a c And a d Then
FirstLarge = a
If b c And b d Then
SecondLarge = c
etc.

But I thought someone might have thought this through already. Anyne done
this?

Thanks,
--
David


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,560
Default Hi to Low

Thank you. I have not been able to try this out, but it looks like it will
work.

I knew there had to be a better way than I was trying.

Thanks,
--
David


"ozgrid.com" wrote:

Use the RANK function. Other Functions that maybe of use a SMALL & LARGE.



--
Regards
Dave Hawley
www.ozgrid.com
"David" wrote in message
...
Hi Group,

I have 4 varaibles, to keep it simple:
a=2
b=1
c=5
d=0

I am looking for code that will rank them largest to smallest. It was much
harder to accomplish than I thought it would be. I have started with
If a b And a c And a d Then
FirstLarge = a
If b c And b d Then
SecondLarge = c
etc.

But I thought someone might have thought this through already. Anyne done
this?

Thanks,
--
David


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



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