Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Array formulas/selecting data

Hi, I would like to use an array formula to retrive an array of data from a
column given a certain condition, for sake of example let the columns look
like this

A B
1 1
2 2
1 3
4 4
5 5

Selecting 2 cells and using the array formula (ctrl+shift+enter)
If("A1:A5"=1;"B1:B5";"") yields the value 1 in both cells.

What do I do to get the full array, in this case 1,3 in the cells
respectively?

I want to use this as a VLOOKUP function where the lookup range doesnt have
unique elements so any other suggestions on this matter are highly
appriciated as well.

Brgds/ Kalle

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Array formulas/selecting data

Enter the below formula and copy down as required..which should give 1,3 etc;.

=SMALL(IF($A$1:$A$5=1,$B$1:$B$5,""),ROW(A1))

If this post helps click Yes
---------------
Jacob Skaria


"Kalle" wrote:

Hi, I would like to use an array formula to retrive an array of data from a
column given a certain condition, for sake of example let the columns look
like this

A B
1 1
2 2
1 3
4 4
5 5

Selecting 2 cells and using the array formula (ctrl+shift+enter)
If("A1:A5"=1;"B1:B5";"") yields the value 1 in both cells.

What do I do to get the full array, in this case 1,3 in the cells
respectively?

I want to use this as a VLOOKUP function where the lookup range doesnt have
unique elements so any other suggestions on this matter are highly
appriciated as well.

Brgds/ Kalle

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,520
Default Array formulas/selecting data

Correction...Try the below array formula..and copy down .

=INDEX($B$1:$B$5,SMALL(IF($A$1:$A$5=1,ROW($B$1:$B$ 5)),ROW(A2)))

You can change the value 1 to a cell reference

=INDEX($B$1:$B$5,SMALL(IF($A$1:$A$5=<cell reference,ROW($B$1:$B$5)),ROW(A2)))

If this post helps click Yes
---------------
Jacob Skaria


"Jacob Skaria" wrote:

Enter the below formula and copy down as required..which should give 1,3 etc;.

=SMALL(IF($A$1:$A$5=1,$B$1:$B$5,""),ROW(A1))

If this post helps click Yes
---------------
Jacob Skaria


"Kalle" wrote:

Hi, I would like to use an array formula to retrive an array of data from a
column given a certain condition, for sake of example let the columns look
like this

A B
1 1
2 2
1 3
4 4
5 5

Selecting 2 cells and using the array formula (ctrl+shift+enter)
If("A1:A5"=1;"B1:B5";"") yields the value 1 in both cells.

What do I do to get the full array, in this case 1,3 in the cells
respectively?

I want to use this as a VLOOKUP function where the lookup range doesnt have
unique elements so any other suggestions on this matter are highly
appriciated as well.

Brgds/ Kalle

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
Selecting 3 buttons out of a 3 x 3 array of options. Tayo Excel Discussion (Misc queries) 1 February 20th 09 12:53 AM
Problems when sorting data containing array formulas Rationale01 Excel Worksheet Functions 0 April 7th 08 01:34 AM
Vlookup - Array not selecting in other workbook Erinayn Excel Discussion (Misc queries) 0 March 21st 07 03:03 PM
Array formulas won't recognize external data from Microsoft Query mmrtech Excel Discussion (Misc queries) 7 December 18th 06 11:31 PM
selecting cells which contain formulas but return blanks hot dogs Excel Discussion (Misc queries) 3 September 12th 06 12:07 PM


All times are GMT +1. The time now is 04:10 AM.

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"