Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 150
Default Returning row and column headers of a value

Hi,

I have a sheet with data as follows:

Version1 Version2 Version3
Product1 150 175 250
Product2 225 180 395
Product3 145 170 360

The table has all distinct values (no duplicates/repetitions)

In a cell away from the table, the user inputs one of the table values
eg. 170, in the adjacent columns the row header viz. Product3 and
column header viz. Version2 should be displayed.

Can this be done using Excel native functions? Or UDFs?

Thanks in advance for the help.

Regards,
Raj
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 15,768
Default Returning row and column headers of a value

Try these array formulas**.

Assume your data is in the range A1:D4

G2 = 170

For the column header:

=INDEX(B1:D1,MAX((B2:D4=G2)*COLUMN(B2:D4))-COLUMN(B2)+1)

For the row header:

=INDEX(A2:A4,MAX((B2:D4=G2)*ROW(B2:D4))-ROW(B2)+1)

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER). Hold down both the CTRL key and the SHIFT
key then hit ENTER.

--
Biff
Microsoft Excel MVP


"Raj" wrote in message
...
Hi,

I have a sheet with data as follows:

Version1 Version2 Version3
Product1 150 175 250
Product2 225 180 395
Product3 145 170 360

The table has all distinct values (no duplicates/repetitions)

In a cell away from the table, the user inputs one of the table values
eg. 170, in the adjacent columns the row header viz. Product3 and
column header viz. Version2 should be displayed.

Can this be done using Excel native functions? Or UDFs?

Thanks in advance for the help.

Regards,
Raj



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,766
Default Returning row and column headers of a value

Hi,

This is to know the version

=CHOOSE(SUMPRODUCT((G6:J9=G12)*((COLUMN(G6:J9)-COLUMN(G6)))),H6,I6,J6)

This is to know the product

=CHOOSE(SUMPRODUCT((G6:J9=G12)*((ROW(G6:J9)-ROW(G6)))),G7,G8,G9)

The data is in range G6:J9. G12 holds 170


--
Regards,

Ashish Mathur
Microsoft Excel MVP
www.ashishmathur.com

"Raj" wrote in message
...
Hi,

I have a sheet with data as follows:

Version1 Version2 Version3
Product1 150 175 250
Product2 225 180 395
Product3 145 170 360

The table has all distinct values (no duplicates/repetitions)

In a cell away from the table, the user inputs one of the table values
eg. 170, in the adjacent columns the row header viz. Product3 and
column header viz. Version2 should be displayed.

Can this be done using Excel native functions? Or UDFs?

Thanks in advance for the help.

Regards,
Raj


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11
Default Returning row and column headers of a value

On Aug 22, 4:54*am, "Ashish Mathur" wrote:
Hi,

This is to know the version

=CHOOSE(SUMPRODUCT((G6:J9=G12)*((COLUMN(G6:J9)-COLUMN(G6)))),H6,I6,J6)

This is to know the product

=CHOOSE(SUMPRODUCT((G6:J9=G12)*((ROW(G6:J9)-ROW(G6)))),G7,G8,G9)

The data is in range G6:J9. *G12 holds 170

--
Regards,

Ashish Mathur
Microsoft Excel MVPwww.ashishmathur.com

"Raj" wrote in message

...

Hi,


I have a sheet with data as follows:


* * * * * * * * Version1 * * Version2 * *Version3
Product1 * * * * * 150 * * * * * * 175 * * * * *250
Product2 * * * * * *225 * * * * * * 180 * * * * *395
Product3 * * * * * *145 * * * * * * 170 * * * * 360


The table has all distinct values (no duplicates/repetitions)


In a cell away from the table, the user inputs one of the table values
eg. 170, in the adjacent columns the row header viz. Product3 and
column header viz. Version2 should be displayed.


Can this be done using Excel native functions? Or UDFs?


Thanks in advance for the help.


Regards,
Raj


Hi Ashish,

Thanks a lot for that solution. I was interested in knowing how it all
works so that I could use that learning on future occasions in other
contexts. Please help.

Thanks in Advance.

Regards,
Rajendra
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
lookup using column headers and row headers Memphus01 Excel Discussion (Misc queries) 1 April 13th 09 04:57 PM
Column Headers Leslie Excel Discussion (Misc queries) 0 July 21st 08 05:24 PM
LookUp Function with Two Column Search Returning One Column Value insitedge Excel Worksheet Functions 8 March 3rd 08 05:59 AM
make column values column headers dunskii Excel Discussion (Misc queries) 5 September 19th 06 12:00 PM
Excel - returning column headers in a seperate column ExcelConfused Excel Discussion (Misc queries) 1 March 28th 06 02:49 PM


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