Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Easy Problem that I can't figure out

I just want to search a row for a certain value, and then return the column
number that the value is in. Easy right? but I cant figure it out.

Someone help me.

Thanks,
Cory
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default Easy Problem that I can't figure out

Example, in B2: =MATCH(A2,$1:$1,0)
where A2 houses the value to be matched within row1

B2 will return the col "number".
Eg if A2's value is found/matched in C1, B2 will return: 3 (col #3)
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Cory from Eugene" wrote:
I just want to search a row for a certain value, and then return the column
number that the value is in. Easy right? but I cant figure it out.

Someone help me.

Thanks,
Cory

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Easy Problem that I can't figure out

Do you want the relative column number or the absolute column number?

Assume you have this data in E1:J1

10, 96, 21, 47, 99, 35

You want to lookup the column number for the number 10.

For the relative column number:

A1 = 10

=MATCH(A1,E1:J1,0)

Returns 1

For the absolute column number:

=INDEX(COLUMN(E1:J1),MATCH(A1,E1:J1,0))

Returns 5


--
Biff
Microsoft Excel MVP


"Cory from Eugene" wrote in
message ...
I just want to search a row for a certain value, and then return the column
number that the value is in. Easy right? but I cant figure it out.

Someone help me.

Thanks,
Cory



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
Problem with Median Figure Big Geordie New Users to Excel 1 January 5th 07 02:33 PM
Can anyone figure this code problem please simonsmith Excel Discussion (Misc queries) 1 May 18th 06 08:20 PM
Very interesting problem that should be a snap to figure out! KenRamoska Excel Discussion (Misc queries) 3 March 15th 06 08:38 PM
OsCommerce - Easy Populate Script - CSV/TXT Conversion Problem. PriceTrim Excel Discussion (Misc queries) 3 July 5th 05 05:27 PM
new user with easy question? not easy for me speakeztruth New Users to Excel 5 June 3rd 05 09:40 PM


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