ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Is there a function to get column # of cell with matching value (https://www.excelbanter.com/excel-worksheet-functions/164505-there-function-get-column-cell-matching-value.html)

Neslihan

Is there a function to get column # of cell with matching value
 
Hi,

I would like to write a function that will bring out the column index number
for a cell containg a particulat lot #, i.e.

A B C
1 3 366
5 2 22


What function do I need to use that will determine the column index # for
the cell containing the value of "366"??


Thanks,

Neslihan

T. Valko

Is there a function to get column # of cell with matching value
 
Try this array formula** :

=MAX((A1:C2=366)*COLUMN(A1:C2))

If there are multiple instances of 366 the formula will return the rightmost
column number.

** array formulas need to be entered using the key combination of
CTRL,SHIFT,ENTER (not just ENTER)

--
Biff
Microsoft Excel MVP


"Neslihan" wrote in message
...
Hi,

I would like to write a function that will bring out the column index
number
for a cell containg a particulat lot #, i.e.

A B C
1 3 366
5 2 22


What function do I need to use that will determine the column index # for
the cell containing the value of "366"??


Thanks,

Neslihan





All times are GMT +1. The time now is 10:54 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com