Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Find a value in a table and return the cell or column reference

Please help! I need a formula that will allow me to search across multiple
rows and columns and find a match and then return the cell reference or
column reference of the match. I can't just use vlookup or hlookup, because
they only search the first column or row. Below is an example of the data I
will be searching. Each month I get a list of names and a number associated
with that name, and I need a formula that will identify which group that
number belongs to by searching the data below.
GROUP A GROUP B GROUP C GROUP D GROUP E GROUP F GROUP G
00080001 01160001 01160023 00700001 01160007 01160010 01160020
00690001 01160002 01160008 01160018
00690002 01160003 01160009
00690003 01160004 01160011
00690004 01160005 01160012
01500001 01160006 01160013

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,118
Default Find a value in a table and return the cell or column reference

Try something like this:

With
your posted data in cells A1:G7
AND assuming there are NO duplicate values in that range.

I1: (any value from the list)
J1: =INDEX($A$1:$G$1,1,SUMPRODUCT(($A$2:$G$7=I1)*COLUM N($A$1:$G$1)))

If I1: 1160009
the formula in J1 returns Group E

Is that something you can work with?

***********
Regards,
Ron

XL2002, WinXP


"jgrout" wrote:

Please help! I need a formula that will allow me to search across multiple
rows and columns and find a match and then return the cell reference or
column reference of the match. I can't just use vlookup or hlookup, because
they only search the first column or row. Below is an example of the data I
will be searching. Each month I get a list of names and a number associated
with that name, and I need a formula that will identify which group that
number belongs to by searching the data below.
GROUP A GROUP B GROUP C GROUP D GROUP E GROUP F GROUP G
00080001 01160001 01160023 00700001 01160007 01160010 01160020
00690001 01160002 01160008 01160018
00690002 01160003 01160009
00690003 01160004 01160011
00690004 01160005 01160012
01500001 01160006 01160013

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Find a value in a table and return the cell or column referenc

Works beautifully! Thanks for your quick reply.

"Ron Coderre" wrote:

Try something like this:

With
your posted data in cells A1:G7
AND assuming there are NO duplicate values in that range.

I1: (any value from the list)
J1: =INDEX($A$1:$G$1,1,SUMPRODUCT(($A$2:$G$7=I1)*COLUM N($A$1:$G$1)))

If I1: 1160009
the formula in J1 returns Group E

Is that something you can work with?

***********
Regards,
Ron

XL2002, WinXP


"jgrout" wrote:

Please help! I need a formula that will allow me to search across multiple
rows and columns and find a match and then return the cell reference or
column reference of the match. I can't just use vlookup or hlookup, because
they only search the first column or row. Below is an example of the data I
will be searching. Each month I get a list of names and a number associated
with that name, and I need a formula that will identify which group that
number belongs to by searching the data below.
GROUP A GROUP B GROUP C GROUP D GROUP E GROUP F GROUP G
00080001 01160001 01160023 00700001 01160007 01160010 01160020
00690001 01160002 01160008 01160018
00690002 01160003 01160009
00690003 01160004 01160011
00690004 01160005 01160012
01500001 01160006 01160013

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 275
Default Find a value in a table and return the cell or column referenc


could u please explain how the formula works??
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
Find a value in a table and return the cell reference Rasoul Khoshravan Excel Worksheet Functions 10 October 26th 06 11:23 PM
Lookup Data in two seperate Spreadsheets Padraig Excel Worksheet Functions 6 June 28th 06 03:05 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
return cell reference from any column Pirjo Excel Worksheet Functions 2 September 9th 05 06:11 AM
Possible Lookup Table Karen Excel Worksheet Functions 5 June 8th 05 09:43 PM


All times are GMT +1. The time now is 11:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"