View Single Post
  #13   Report Post  
Posted to microsoft.public.excel.misc
CLR
 
Posts: n/a
Default Reverse Matrix lookup?

Thanks much Gary"s Student.........no great rush. I am wanting to use this
for an upcoming project.....plenty of time. Also, just discovered it don't
seem to work in XL97......could something be changed to
allow?................I really appreciate your help.

Thanks again,
Vaya con Dios,
Chuck, CABGx3




"Gary''s Student" wrote:

Hi CLR

I'll look at TEXT values later today. Right now the undergrads are swarming
all over our help center. I'll be tied up until after 6:00PM (east coast).
--
Gary's Student


"CLR" wrote:

Hi Gary"s Student, thanks for the reply. I had a little trouble with it at
first, getting some #VALUE! and #NAME errors.....but then I got the knack and
it seems to be ok now. I really prefer this method over the other much
longer formula suggestions, except that they both work on TEXT and I can't
seem to make this one do it. It seems to fail when trying to look up a TEXT
value, as well as any number in a row that has any TEXT in it and any row
thereafter. I know that was not a requirement in the original problem, but
could your solution be easily modified to work with both TEXT and numbers as
well? If so, I would be much appreciative.

Thanks again,
Vaya con Dios,
Chuck, CABGx3


"Gary''s Student" wrote:

From S100 thru X105:

xxx 2001 2002 2003 2004 2005
dogs 1 2 3 4 5
cats 10 9 8 7 6
pigs 11 12 13 14 15
fish 20 19 18 17 16
birds 21 22 23 24 25


a 5x5 with titles

Function titles(r As Range, v As Integer) As String
Dim rr As Range, s1, s2 As String, gotit As Boolean
titles = ""
gotit = False

For Each rr In r
If rr.Value = v Then
gotit = True
Exit For
End If
Next
If gotit = False Then Exit Function

s1 = Cells(r.Row, rr.Column)
s2 = Cells(rr.Row, r.Column)
titles = s1 & Chr(10) & s2
End Function


=titles(S100:X105,12) will display:


"2002
pigs"

--
Gary's Student


"CLR" wrote:

Hi All......
I have a small 5x5 matrix on a worksheet. Normally one supplies the Row
and Column Titles of a matrix to return the crossover value. I want to do it
in reverse. I want to supply the crossover value and in return get the Row
and Column Titles from the matrix, (not the Excel cell address).

TIA for any assistance,
Vaya con Dios,
Chuck, CABGx3