View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Hilberg David Hilberg is offline
external usenet poster
 
Posts: 84
Default finding all cells that match a certain value


(The 2 is for column B ...


Correction: 2 is the starting row in this example.

- David

David Hilberg wrote:
Okay, here is a two-column solution. You'll have to modify the formulas
to suit your ranges.

Assuming your Names are in B2:B10 and Remarks are in C2:C10:
D is the helper column.
In D1 enter 0.
In D2 enter and copy down:

=MATCH(E$1,INDIRECT(ADDRESS(2+SUM(D$1:D1),3)&":c10 "),0)

(The 2 is for column B, where the Names are. The 3 is for the Remarks
column, C.)

In E1 enter the Remark you are searching upon.
In E2 enter and copy down:

=OFFSET(INDEX(C$2:C$10,SUM(D$2:D2)),,-1)

(The -1 assumes the Names column is one column to the left of the
Remarks column.)

You should see names in column E. When no more of the desired remarks
are found, the formula will yield #REF!

Hope this helps,

- David

OTS wrote:
ok i have some data arranged as such, the first column is filled with
names and the column next to it is a remarks column, filled with say,
numbers from 1-10. what i want is to have a third column, whereby
let's say i choose the number 8, all the names with a number 8 next to
them will appear in the third column. can anyone help?

thanks.