LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,872
Default Need formulas for searching for a value in a table and returning row/column name

Hi John,

Am Thu, 15 Nov 2012 19:56:23 +0000 schrieb Johnrd1963:

I have already tried a variation of this
formula with the SUMPRODUCT function. It doesn't work (returns an
error) when used with dates that are listed more than once. What I need
when it finds more than one cell with the same date, I need it to return
the row/column header of the first occurring cell, from top to bottom,
in the table.


your search date still in L1
for the row header try:
=IF(ROWS($1:1)COUNTIF($B$2:$J$100,$L$1),"",INDEX( $A$1:$A$100,SMALL(IF($B$1:$J$100=$L$1,ROW($1:$100) ),ROW(A1))))
the column header:
=INDEX($A$1:$J$1,MATCH($L$1,INDIRECT(SMALL(IF($B$1 :$J$100=$L$1,ROW($1:$100)),ROW(A1))&":"&SMALL(IF($ B$1:$J$100=$L$1,ROW($1:$100)),ROW(A1))),0))
and copy down.


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2


 
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
Searching for 2 values and returning the sum... leekesm Excel Discussion (Misc queries) 2 December 9th 08 03:24 PM
Returning a text by searching the whole workbook Sai Krishna[_2_] Excel Discussion (Misc queries) 2 June 16th 08 06:08 AM
Searching a column and returning a yes or no answer [email protected] Excel Worksheet Functions 1 February 21st 06 08:43 PM
Sorting/Searching & returning data pog_g Excel Programming 1 October 3rd 05 08:59 AM
Searching and returning row number of a value MikeDH Excel Worksheet Functions 1 August 9th 05 06:06 PM


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