Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 15
Default return multiple values when within range (greater than and less than)

I have a list of names in column A and a list of scores (between 1 and 5) in column B. I want to sort the names out into three categories: scores greater than 4, scores between 3 and 4, and scores less than 3, so a total of 3 formulas. The following formulas copied down their columns return all names with the appropriate scores:

={INDEX($A$1:$B$150,SMALL(IF($B$1:$B$150=4,ROW($B $1:$B$150)),ROW(1:1)),1)}

and

={INDEX($A$1:$B$150,SMALL(IF($B$1:$B$150<3,ROW($B$ 1:$B$150)),ROW(1:1)),1)}

...but I can't make a formula work that returns values between 3 and 4.

Any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,514
Default return multiple values when within range (greater than and less than)

I have a list of names in column A and a list of scores (between 1 and
5) in column B. I want to sort the names out into three categories:
scores greater than 4, scores between 3 and 4, and scores less than 3,
so a total of 3 formulas. The following formulas copied down their
columns return all names with the appropriate scores:

={INDEX($A$1:$B$150,SMALL(IF($B$1:$B$150=4,ROW($B $1:$B$150)),ROW(1:1)),1)}

and

={INDEX($A$1:$B$150,SMALL(IF($B$1:$B$150<3,ROW($B$ 1:$B$150)),ROW(1:1)),1)}

...but I can't make a formula work that returns values between 3 and 4.

Any ideas?


Try specifying...

AND(<4,3)

...as your criteria.

--
Garry

Free uenet access at http://www.eternal-september.org
Classic VB Users Regroup
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #3   Report Post  
Junior Member
 
Posts: 15
Default

Quote:
Originally Posted by GS[_2_] View Post
I have a list of names in column A and a list of scores (between 1 and
5) in column B. I want to sort the names out into three categories:
scores greater than 4, scores between 3 and 4, and scores less than 3,
so a total of 3 formulas. The following formulas copied down their
columns return all names with the appropriate scores:

={INDEX($A$1:$B$150,SMALL(IF($B$1:$B$150=4,ROW($B $1:$B$150)),ROW(1:1)),1)}

and

={INDEX($A$1:$B$150,SMALL(IF($B$1:$B$150<3,ROW($B$ 1:$B$150)),ROW(1:1)),1)}

...but I can't make a formula work that returns values between 3 and 4.

Any ideas?


Try specifying...

AND(<4,3)

...as your criteria.

--
Garry

Free uenet access at http://www.eternal-september.org
Classic VB Users Regroup
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion
Not sure if I have the syntax correct, but I get #NUM when I try the following:

={INDEX($A$1:$B$150,SMALL(IF(AND($B$1:$B$150<4,$B$ 1:$B$1503),ROW($B$1:$B$150)),ROW(1:1)),1)}

Last edited by sporenta : August 14th 13 at 03:30 AM
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,514
Default return multiple values when within range (greater than and less than)

Just curious why you don't just sort the range on Col B?

--
Garry

Free uenet access at http://www.eternal-september.org
Classic VB Users Regroup
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default return multiple values when within range (greater than and less than)

Hi,

Am Wed, 14 Aug 2013 01:41:39 +0100 schrieb sporenta:

I have a list of names in column A and a list of scores (between 1 and
5) in column B. I want to sort the names out into three categories:
scores greater than 4, scores between 3 and 4, and scores less than 3,
so a total of 3 formulas. The following formulas copied down their
columns return all names with the appropriate scores:

={INDEX($A$1:$B$150,SMALL(IF($B$1:$B$150=4,ROW($B $1:$B$150)),ROW(1:1)),1)}


try:
=INDEX($A$1:$A$150,SMALL(IF($B$1:$B$150=4,ROW($1: $150)),ROW(A1)))
and enter the array formula with CTRL+Shift+Enter


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2


  #6   Report Post  
Junior Member
 
Posts: 15
Default

Quote:
Originally Posted by Claus Busch View Post
Hi,

Am Wed, 14 Aug 2013 01:41:39 +0100 schrieb sporenta:

I have a list of names in column A and a list of scores (between 1 and
5) in column B. I want to sort the names out into three categories:
scores greater than 4, scores between 3 and 4, and scores less than 3,
so a total of 3 formulas. The following formulas copied down their
columns return all names with the appropriate scores:

={INDEX($A$1:$B$150,SMALL(IF($B$1:$B$150=4,ROW($B $1:$B$150)),ROW(1:1)),1)}


try:
=INDEX($A$1:$A$150,SMALL(IF($B$1:$B$150=4,ROW($1: $150)),ROW(A1)))
and enter the array formula with CTRL+Shift+Enter


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
Claus,

That works for finding values greater than 4, and when I change it to find values less than 3, it works too. It's finding values in-between 3 and 4 that I still can't get to work. So, working off of your formula I tried:

=INDEX($A$1:$A$150,SMALL(IF(AND($B$1:$B$1503,$B$1 :$B$150<4),ROW($1:$150)),ROW(A1)))

CNTRL+Shft+Enter

But I still get a #NUM error.

Garry, that would be a easy way to go! I'm crunching lots of numbers that are often updated, and this is just the first stop on a longer process. It's easier to have other parts of the workbook look at presorted columns.
  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default return multiple values when within range (greater than and less than)

Hi,

Am Wed, 14 Aug 2013 13:24:08 +0100 schrieb sporenta:

That works for finding values greater than 4, and when I change it to
find values less than 3, it works too. It's finding values in-between 3
and 4 that I still can't get to work.


filter your column B with number filter "is not equal 3"


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default return multiple values when within range (greater than and less than)

Hi again,

Am Wed, 14 Aug 2013 15:25:11 +0200 schrieb Claus Busch:

filter your column B with number filter "is not equal 3"


or try:
=INDEX($A$1:$A$150,SMALL(IF(($B$1:$B$150<3),ROW($ 1:$150)),ROW(A1)))
and enter the formula with CTRL+Shift+Enter


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default return multiple values when within range (greater than and less than)

Hi,

Am Wed, 14 Aug 2013 15:30:27 +0200 schrieb Claus Busch:

=INDEX($A$1:$A$150,SMALL(IF(($B$1:$B$150<3),ROW($ 1:$150)),ROW(A1)))


or try:
=INDEX(A$1:A$150,SMALL(IF((B$1:B$150<3)+(B$1:B$150 =4),ROW($1:$150)),ROW(A1)))


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #10   Report Post  
Junior Member
 
Posts: 15
Default

Quote:
Originally Posted by Claus Busch View Post
Hi,

Am Wed, 14 Aug 2013 15:30:27 +0200 schrieb Claus Busch:

=INDEX($A$1:$A$150,SMALL(IF(($B$1:$B$150<3),ROW($ 1:$150)),ROW(A1)))


or try:
=INDEX(A$1:A$150,SMALL(IF((B$1:B$150<3)+(B$1:B$150 =4),ROW($1:$150)),ROW(A1)))


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
Claus,

Thanks for the suggestions. That last one is returning non-error results, but too many, unfortunately. When I SHFT+CNTRL+ENTER:

=INDEX(A$1:A$150,SMALL(IF((B$1:B$150<4)+(B$1:B$150 =3),ROW($1:$150)),ROW(A1)))

...it returns all the names, not just the ones that fall between 3 and 4.


  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default return multiple values when within range (greater than and less than)

Hi,

Am Wed, 14 Aug 2013 18:08:54 +0100 schrieb sporenta:

Thanks for the suggestions. That last one is returning non-error
results, but too many, unfortunately. When I SHFT+CNTRL+ENTER:

=INDEX(A$1:A$150,SMALL(IF((B$1:B$150<4)+(B$1:B$150 =3),ROW($1:$150)),ROW(A1)))

..it returns all the names, not just the ones that fall between 3 and
4.


I thought you want the names <3 and =4.
For the names between 3 and 4 try:
=INDEX($A$1:$A$150,SMALL(IF(($B$1:$B$150=3)-($B$1:$B$1504),ROW($1:$150)),ROW(A1)))
and CTRL+Shift+Enter


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
  #12   Report Post  
Junior Member
 
Posts: 15
Default

Quote:
Originally Posted by Claus Busch View Post
Hi,

Am Wed, 14 Aug 2013 18:08:54 +0100 schrieb sporenta:

Thanks for the suggestions. That last one is returning non-error
results, but too many, unfortunately. When I SHFT+CNTRL+ENTER:

=INDEX(A$1:A$150,SMALL(IF((B$1:B$150<4)+(B$1:B$150 =3),ROW($1:$150)),ROW(A1)))

..it returns all the names, not just the ones that fall between 3 and
4.


I thought you want the names <3 and =4.
For the names between 3 and 4 try:
=INDEX($A$1:$A$150,SMALL(IF(($B$1:$B$150=3)-($B$1:$B$1504),ROW($1:$150)),ROW(A1)))
and CTRL+Shift+Enter


Regards
Claus B.
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
That did it! Woo-hoo!

Thanks for your help.
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 to check if the values in a range of cells are greater than 0 DP Excel Worksheet Functions 3 March 19th 10 01:31 PM
Countif and values greater than zero for a named range Angela Excel Worksheet Functions 1 November 17th 09 04:32 PM
help! subscript out of range error when trying to return multiple values from function (as variant array) ker_01 Excel Programming 2 August 4th 08 08:16 PM
Find a Match in Multiple Places & Return Multiple Values Toria Excel Worksheet Functions 3 June 24th 08 09:49 PM
Search multiple values to return single values JANA Excel Worksheet Functions 8 October 27th 05 04:26 PM


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