LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Getting all positions of a value in an array or reference

see your other post

--
Biff
Microsoft Excel MVP


"ORLANDO VAZQUEZ" wrote in message
...
Hi Alan,

I think I need to use this formula you show on your website but I can't
get
it to work.
I have a column of values in column a. Can you help me ?

For example the formula should look up col.A # 22 and return fro col.D the
following list: Dog Biscuit Steak

A B C D

22 34 Apple
33 34 Fish
16 22 Dog
91 1 Orange
15 3 Tangerine
14 22 Biscuit
21 1 Tea
34 5 Salmon
17 22 Steak
7 Herring
8 Cod
1 Orange
1 Castle



Function VLookups(lookupValue, lookupArray, ColumnNumber)
'This function acts somewhat like the built-in VLookup
'Function with exact matches, except that it returns an
'array of all the values corresponding to multiple
'occurrences of the sought value in the left hand column
'(i.e., the first column vector in the lookup array).


"Alan Beban" wrote:

Yossi wrote:
Hi,
I have a reference to a row and in that row, several cells have the
value of
1. I would like to get the positions of all of them from the array.
For example:
A1 A2 A3 A4 A5 A6
1 0 1 1 0 0

I would like to get A1, A3, A4
is there a way to retrieve that information in a single formula?
thanks


If the functions in the freely downloadable file at
http:?home.pacbell.net/beban are available to your workbook

=INDEX(ArrayMatch(1,$A$1:$A$6,"A",4),ROW(A1)) entered in a cell and
copied down until you get a #REF! error; or
=IF(NOT(ISERROR(INDEX(ArrayMatch(1,$A$1:$A$6,"A",4 ),ROW(A1)))),INDEX(ArrayMatch(1,$A$1:$A$6,"A",4),R OW(A1)),"")
copied down the length of the data file (6 in this case).

Alan Beban,



 
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
Match / Vlookup within an Array formula Hari Prasadh Excel Discussion (Misc queries) 3 February 3rd 05 04:37 PM
Where is the bug in my array? Gail Gurman Excel Discussion (Misc queries) 1 January 25th 05 12:36 AM
Working with array equations OkieViking Excel Discussion (Misc queries) 2 January 23rd 05 07:43 AM
Formula to list unique values JaneC Excel Worksheet Functions 4 December 10th 04 12:25 AM
VBA Import of text file & Array parsing of that data Dennis Excel Discussion (Misc queries) 4 November 28th 04 10:20 PM


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