#### return a column no

```I have a cell containing text.  I need a formula that takes the text and
finds an exact match in a row and return the column no.

Eg

Find Text: Name3

Name1    Name2    Name3    Name4    Name5

I want to return the column number which in this case is row 3.

I know there is a simple formula but I cant find it

Thanks

```
 0
info9857 (5)
1/13/2008 9:35:56 PM
excel 39879 articles. 2 followers.

4 Replies
750 Views

Similar Articles

[PageSpeed] 15

```=match(a2,1:1,0)
will return the number of the column of the first match (if there is one).

Assumes that the Name3 is in A2 and the names are listed in A1:IV1 (row 1)

Craig McLaughlin wrote:
>
> I have a cell containing text.  I need a formula that takes the text and
> finds an exact match in a row and return the column no.
>
> Eg
>
> Find Text: Name3
>
> Name1    Name2    Name3    Name4    Name5
>
> I want to return the column number which in this case is row 3.
>
> I know there is a simple formula but I cant find it
>
> Thanks

--

Dave Peterson
```
 0
petersod (12005)
1/13/2008 10:06:56 PM
```A1 = Name3

A5:E5 = Name1,Name2,Name3,Name4,Name5

This will return the *relative* position of the lookup_value in the
lookup_array:

=MATCH(A1,A5:E5,0)

=3

--
Biff
Microsoft Excel MVP

"Craig McLaughlin" <info@NOTHANKS.discoverymedia.co.uk> wrote in message
news:uXT5JxiVIHA.1132@TK2MSFTNGP06.phx.gbl...
>I have a cell containing text.  I need a formula that takes the text and
>finds an exact match in a row and return the column no.
>
> Eg
>
> Find Text: Name3
>
>
> Name1    Name2    Name3    Name4    Name5
>
>
> I want to return the column number which in this case is row 3.
>
> I know there is a simple formula but I cant find it
>
> Thanks
>
>
>
>

```
 0
biffinpitt (3172)
1/13/2008 10:09:31 PM
```Maybe this...........

=MATCH("NAME3",A1:E1,0)

Vaya con Dios,
Chuck, CABGx3

"Craig McLaughlin" <info@NOTHANKS.discoverymedia.co.uk> wrote in message
news:uXT5JxiVIHA.1132@TK2MSFTNGP06.phx.gbl...
> I have a cell containing text.  I need a formula that takes the text and
> finds an exact match in a row and return the column no.
>
> Eg
>
> Find Text: Name3
>
>
> Name1    Name2    Name3    Name4    Name5
>
>
> I want to return the column number which in this case is row 3.
>
> I know there is a simple formula but I cant find it
>
> Thanks
>
>
>
>

```
 0
croberts (1377)
1/13/2008 10:10:56 PM
```thanks to everyone for their help

Craig

"Dave Peterson" <petersod@verizonXSPAM.net> wrote in message
news:478A8B80.98235299@verizonXSPAM.net...
> =match(a2,1:1,0)
> will return the number of the column of the first match (if there is one).
>
> Assumes that the Name3 is in A2 and the names are listed in A1:IV1 (row 1)
>
> Craig McLaughlin wrote:
>>
>> I have a cell containing text.  I need a formula that takes the text and
>> finds an exact match in a row and return the column no.
>>
>> Eg
>>
>> Find Text: Name3
>>
>> Name1    Name2    Name3    Name4    Name5
>>
>> I want to return the column number which in this case is row 3.
>>
>> I know there is a simple formula but I cant find it
>>
>> Thanks
>
> --
>
> Dave Peterson

```
 0
info9857 (5)
1/15/2008 11:03:18 PM

Similar Artilces:

Help with column
I have a datafeed that comes to me everyday i need to format one column of around 1000 rows so it multiples the total column but a 1000 so getting rid of the decimal point i.e =A3100.00 becoming 10000 , i also need to do this using a macro. can anyone help=20 Regards=20 Paul Dim iLastRow As Long Dim i As Long iLastRow = Cells(Rows.Count, "A").End(xlUp).Row For i = 1 To iLastRow Cells(i, "A").Value = Cells(i, "A").Value * 100 Next i -- HTH Bob Phillips "lennymos123" <paul@palo.co.uk> wrote in message news:1115651206....

How do I pivot a range of cells, i.e. from column to row?
How do I pivot/transpose the data from a range of cells from, say, a column to a row? I imagine it should be very simple, but I haven't found out how yet. For instance: row# 1 data 1 2 data 2 3 data 3 4 data 4 to column# 1 2 3 4 data1 data2 data3 data4 ...

Edit Box carriage return
How do I add a carriage return and have it show up correctly in an mfc textbox? I need to edit the CString variable then updatedata and have it show multiple lines. The multiline option is selected. Use \r\n. "CodeTyro" <CodeTyro@discussions.microsoft.com> wrote in message news:819EB280-849A-4672-81C6-12DB72952B9B@microsoft.com... > How do I add a carriage return and have it show up correctly in an mfc textbox? I need to edit the CString variable then updatedata and have it show multiple lines. The multiline option is selected. ...

SUM cells in column based upon criteria in two others.
Can not seem to put together a formula that accomplishes the following: Column J contains contributions by individuals for 2010 Column I contains contributions by individuals made in 2009 Column N contains an indicator (+ - or 0) of the increase or decrease over the two years Column P contains a designation of which members are new members. I need a formula that looks at column I cells against column J cells, totals the contributions made be each of the criteria in column N, but does NOT include those with any designation in column P. Example of the data: I ...

Return receipt In WAE?
I can't find where to request a Return Receipt for a message in Entourage Web Access Edition. Not only can I not find it anywhere in the menus or Preferences, but I can not find a reference to it in Help. Is this feature not available in Web Access Edition? If it is, where is it, please? Bill Robertson The feature is not available in EWS, but you can give this a try <http://www.entourage.mvps.org/faq_topic/return_receipt.html> Keep in mind that return receipts are not a reliable indication that a message has either been read or received. thanks, Pawan Kapoo...

Creating column
I would like to create a column that automatically adds one for each row. Ex. 2001, 2002, 2003, 2004 Hi, Type 2001 in any one cell (say G1) and then in G2, type =G1+1. COpy this formula down -- Regards, Ashish Mathur Microsoft Excel MVP "AAA1986" <AAA1986@discussions.microsoft.com> wrote in message news:6850AC6B-AD98-4AE3-9ABA-D81D06583052@microsoft.com... > I would like to create a column that automatically adds one for each row. > > Ex. 2001, 2002, 2003, 2004 ...

Return Range Based on Cell Value
This topic has been covered in varying degrees, but the problem is that I do not want to sum or count the range. I want the range itself returned as the value. For instance in A1 is 7. i.e. July In B1-B12 are dates 201101, 201102, etc. I need a formula that will count out the cells and return the range based on that value in A1. In this case it would return B1:B7. This of course would be nested in another formula. On Tue, 4 Oct 2011 17:18:20 -0700 (PDT), Pablo < > wrote: >This topic has been covered in varying degrees, but the problem is >that I do not want to sum or count the...

OpenService Fails, but GetLastError returns ERROR_SUCCESS
I'm trying to stop a service, if the service exists. Everything works fine if the service is there, but if it does not exist I'm getting inconsistent results. OpenService returns a zero handle, naturally. On some computers (but not all) GetLastError returns ERROR_SUCCESS instead of ERROR_SERVICE_DOES_NOT_EXIST. Why would I be getting this combination of returns? To determine what the cause might be, it is important to know what "some computers" are. For each one that fails and each one that succeeds, it is important to know OS version Service Pack Installed Hot Fixes in...

Dropbox on each cell of column
Is it possible to have a dropbox appear on each line of a column similar to having a combo box on a form in the datasheet view in Access? Yes there is. If you open the "Forms" tool bar, you can select either a drop down box or a list box. Once you place it on your sheet, right click on it and select "format control", then select the "control" tab. The top line (input range) points to the row or column of cells that you want to appear within the box. The second line (cell range) points to a cell in which a number will appear based on what line within the inp...

Why doesn't the code create a column stacked chart?
Hi again...im sorry to ask for help so much, but charts vba is tricky ... I try to create a column stacked chart of three bars containing each three different values, much like Andy Pope's http://andypope.info/charts/StackColTotal.htm The CHT_21QSBA_S, CHT_21QSBA_B and CHT_21QSBA_A ranges are each three different cells (name CHT_21QSBA_S = A1,B5,Q3) and I thought this together with stating charttype=xlcolumnstacked should create a stacked chart - but it make 9 bars instead... Why? .... Set cht = ActiveSheet.ChartObjects("R_Q_" & Sheet1.Range("RAPP_TILLF").Value ...

Sorting Columns on HTML file created in Excel
Hi.. I'm not sure if I'm just searching for the wrong words, but can't find the answer to this.. I've created an excel file, about 15 columns.. In excel, I can sort the columns easily, but, I've saved the file as HTML now. How can I make it that those columns can still be sortable on the internet? Is there special code I need to put somewhere? I've seen javascript codes that can do this, but I would like to do it all via excel if possible. Any help appreciated! Thanks, -- Rob Hi Terri and Rob, You could include the JavaScript (Bookmarklet) within your HTML cod...

How to Add Columns to "Blank" MS Project?
Is there a way to add columns to "Blank" project that comes up when I click on File/New? I want to always have Text1, Text2, etc with the names Renamed on every Project file I open. This is a multi-part message in MIME format. ------=_NextPart_000_0014_01CAC558.64747C70 Content-Type: text/plain; charset="Windows-1252" Content-Transfer-Encoding: quoted-printable Hi TKGerdie, Welcome to this Microsoft Project newsgroup :-) The best way is to set up a project as you want it and then save it as a = template. Please see FAQ Item: 8. New Project Template. ...

Return Value from Form
I need to return a value from a form displayed modally. Many years ago, if I used VB classic, I could create a public method that took care of any arguments, displayed the form modally, and then returned appropriate return values. Something like this: Public Function GetValue(Args As Integer m_Args = Args m_Result = DefaultResult Show vbModal GetValue = m_Result End Function However, it appears Access VBA doesn't support this. For one thing, there's no Show method (and so it certainly can't have a modal argument). I like this approach because ...

Combo box returning wrong value
I am having trouble with a combo box, which is filled by a query to that displays two fields (Fund # and Fund description). The fields are unbound and I am using VBA to store the unbound fields in a table. I am using an option box to determine which sequence to use to present the data (I use two different queries and store one of them in the row source of the combo box, depending on the option box value). This all works fine. The problem comes when an item is selected. I would like to store the values both the Fund # and the Fund value in my table with VBA. My VBA code in the co...

Just found this site - exciting to learn from the experts! I have a long list of business contacts sorted by Accounts. Unfortunately, I clicked the Accounts column while in the Business Contacts view, and all those accounts disappeared from the column. Now all my contacts are ungrouped (over 3,000). Each individual contact still retains its Linked Account designation, but those accounts are no longer organized via that filter. Can anyone help with bringing back that category to my Business Contacts view? I hope this explanation makes sense. Thanks so much in advance. . Sub...

wmp10 "choose columns" greyed out
This may be a duplicate post. My computer crashed while I was posting it, so I don't know if it went through. Anyway, my problem is with WMP10. There used to be an option to see the song titles (probably an older version), and I don't see that anymore. Under "All music" there is "Artist/Album" and all I see is the artist. I went to "View" to try and add columns, and the option for "choose columns" is greyed out. Any ideas on how to fix this? I'm not too familiar with WMP (was using WINAMP) so any help would be appreciated. ...

how to merge data from multiple columns to one column
I have first, middle, and last name in different columns. How do I merge these three into one column? Try... =A1&" "&B1&" "&C1 for the format John T. Smith OR =C1&", "&A1&" "&B1 for the format Smith, John T. Hope this helps! In article <24D1088D-0AB1-4910-BF0E-37D8D7A4C056@microsoft.com>, "w8ting4hlp" <w8ting4hlp@discussions.microsoft.com> wrote: > I have first, middle, and last name in different columns. How do I merge > these three into one column? ...

One cell from several sheets to one column
I have a spreadsheet with over 200 tabs/worksheets. I want to copy the same cell from every worksheet into one sheet into a single column. The worksheets have unique names. Is a macro the easiest way to move the data? If so, how can I set the macro up to go through each tab, so I don't have to go to each tab and run the macro separately? Thanks, Kel Examples of sheet names and what cell you want? -- Regards Ken....................... Microsoft MVP - Excel Sys Spec - Win XP Pro / XL 97/00/02/03 ------------------------------------------------------------...

Cell Greater Than Cell in Adjacent Column
A B C D 1 112.44 106.92 Y is A1>B4 2 104.90 96.03 N is A2>B4 3 109.71 103.46 N is A3>B4 4 115.74 111.50 Y is A4>B8 5 111.55 110.40 N is A5>B8 6 112.85 112.56 N is A6>B8 7 113.27 113.80 N is A7>B8 8 118.58 114.59 Y is A8>B9 9 118.25 115.85 Y is A9>B12 10 99.75 115.83 N is A10>B12 11 100.25 104.14 N is A11>B12 12 103.69 101.00 Y is A12>B13 13 103.58 99.84 Y is A13>B14 14 107.99 100.75 Y is A14>B15 15 106.33 104.27 I have two columns to which data is entered at the top by inserting a blank row and then adding the data points. The formula that I would ...

Rows and Columns
I am using Excel XP Each worksheet has 65,536 rows and 256 columns according to specifications. Is there a way to change these number to a smaller amount? I know I can hide rows and columns, but wondering if I can not have them to start them. TIA Bill The short answer is NO. Just don't format more than you need. -- Don Guillett SalesAid Software donaldb@281.com "EZDOIT" <Please@smile.com> wrote in message news:dxupc.98556\$Ik.7697285@attbi_s53... > I am using Excel XP > > Each worksheet has 65,536 rows and 256 columns according to specifications. > >...

I have a column of data and I'd like to transpose it to go across.
I have a column of data going down that I'd like to transpose to go across the page so that I can add this info to data going across the page. I mean for example, I have data Jan, Feb, Mar, going down the page and I'd like them to be going across like 1st Month, 2nd Month, 3rd Month etc., but they are going from top to bottom and I want them to go from right to left. I tried the Transpose function, however, when I went to click on the arrow to the Right of PASTE, there was no arrow. Any suggestions?? John Copy the data, right click in Cell where you want to begin paste, sel...

Failed to hide column with message "cannot shift object off sheet"
Hi, I've a Excel 2000 worksheet that has 173 columns (A to FQ) with comments in a number of cells. I can't hide columns (say E:BW) with error message "cannot shift object off sheet". I searched into Microsoft Knowledgebase and found article 211769. I followed the resolution but stopped at step "3." where I can't find "Comment" of Format menu. Can anyone tell me how to resolve this problem? Thanks, Frankie What is in columns FR through IV? If nothing, columns FR:IV and Right-click on a selected columns header - select "Delete. -- HTH...

returning zero on pct divided by zero
formatting goes to pot here so I cant represent the tables as I'd like, but hopefully you get the gist! User entry actual figure is only entered obviously when there is a figure so alot of the time will be blank or zero the fixed value target is always on the sheet and the percentage is basically how much percent of the target has been acheived which is a pct value. Is there anyway of substituting a zero in when you have a pct divided by zero as normally it just comes up with the error message ie USER ENTRY ACTUAL FIGURE FIXED VALUE TARGET PERCENTAGE 5 B1/A1% There...

Sum of Column
I am trying to print a physical inventory with the total cost at the bottom. How can i do this? Thanks ...

VBA Macro change column contents
I have a column in a worksheet which has a list of 3 digit numbers. I want to change the 3 digits to become 4 digits, the new fourth digit has to be a leading zero, i.e 355 to become 0355. I prefer the format of the digits to be a number but a text format would not be a problem. The length of the digits in the column are not static. i.e one month there may be 200 rows of data the next might be 300 and I would want the macro to cater for this variation. Thanks -- James James, A macro simply isn't necessary, select the column and apply a custom format of 0000 that...