+ Reply to Thread
Results 1 to 6 of 6

Finding first character in a row of characters

  1. #1
    Registered User
    Join Date
    11-16-2011
    Location
    Reading, England
    MS-Off Ver
    Excel 365
    Posts
    69

    Finding first character in a row of characters

    I have a large spreadsheet and within each row there are the letters "L" and "H". I want to type a formula which will give me the cell reference (e.g. F2) of the first occurence of the letter "H" in each row and this reference to be listed in column "B" for each row.

  2. #2
    Registered User
    Join Date
    03-18-2013
    Location
    Stryków, Poland
    MS-Off Ver
    Excel 2003 & 2010
    Posts
    21

    Re: Finding first character in a row of characters

    Try like this:
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    11-16-2011
    Location
    Reading, England
    MS-Off Ver
    Excel 365
    Posts
    69

    Re: Finding first character in a row of characters

    Thanks for your suggestion, it is close to what I'm looking for but not quite. In attached excel spreadsheet I want to return the figure in row which corresponds to the first "H" appearing in each subsequent row and for this number to be in column "D" of each row
    Attached Files Attached Files

  4. #4
    Forum Expert Ace_XL's Avatar
    Join Date
    06-04-2012
    Location
    UAE
    MS-Off Ver
    2016
    Posts
    6,074

    Re: Finding first character in a row of characters

    Try

    =IFERROR(INDEX($F$3:$DS$3,MATCH("H",$F4:$DS4,0)),"")

    Copy down
    Life's a spreadsheet, Excel!
    Say thanks, Click *

  5. #5
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Finding first character in a row of characters

    I didn't look at your sample file but maybe something like this will do...

    Assume the range of interest is C2:J2 with the formula being entered in B2.

    This array formula** entered in B2 and copied down as needed:

    =ADDRESS(ROW(),MIN(IF(C2:J2="H",COLUMN(C2:J2))),4)

    ** 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 MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  6. #6
    Registered User
    Join Date
    11-16-2011
    Location
    Reading, England
    MS-Off Ver
    Excel 365
    Posts
    69

    Re: Finding first character in a row of characters

    Thanks for this. It is exactly what I wanted. Much appreciated

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1