View Single Post
  #22   Report Post  
Posted to microsoft.public.excel.misc
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default Index Match Vlookup?

Update on this, as the OP started another thread.

I took the risk and downloaded the file. Your formula worked well once
I had adjusted it to suit the ranges in the file and made the
correction you pointed out. Here is the amended version:

=INDEX($H$2:$H$4,SUMPRODUCT(($I$2:$N$4=C2)*ROW($H$ 2:$H$4))-ROW($H$2:$H$4)+1)

In the sample file the data covers H2:N4, but in reality this will go
down to row 630+.

The formula produced #VALUE if the county in column C was not present
in the reference table.

Pete

PapaDos wrote:
Oups !

Replace D1 by C2 in the above formula, sorry...
--
Festina Lente


"PapaDos" wrote:

Assuming your "System to County" table is in $Q$1:$V$5, enter this formula
into D2
=INDEX($Q$1:$Q$5, SUMPRODUCT(($R$1:$V$5 = D1) * ROW($Q$1:$Q$5)) -
ROW($Q$1:$Q$5) + 1)

Adjust the ranges to fit your needs...

NOTES:
The counties need to be unique in the table, or bad results will occur.

--
Festina Lente


"IntricateFool" wrote:

How would I go about having a function return a single value from searching
several different columns and matching the proper "name" with its "county"?

Here is what the spreadsheet looks like:
C D | H I
J K
1 County System | System County1 County2 County3
2 Mobile ? | System 1 Mobile Montco
Harris
3 Bucks ? | System 2 Ford George
Newman
4 George System2 | System 3 Boman Bucks Farrel
5 York ? | System 4 Rosel Duke
York

D2 should = System 1
D3 should = System 3
D5 should = System 4

Each System contains unique counties. What function (s) would I need to use
to match the correct county to its respective system?

As of now I am trying to use in cell "D2":
=INDEX(H1:K5,MATCH(C2,C2:C1246,0),MATCH(H1,I2:K2,0 )) <-completely off?
obviously not working...
Any help would be greatly appreciated...