+ Reply to Thread
Results 1 to 9 of 9

Excel 2007 : need help to search a column, find a letter, and return the number at the top of the row

  1. #1
    Registered User
    Join Date
    04-11-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    need help to search a column, find a letter, and return the number at the top of the row

    need help to search a column, find a letter, and return the number at the top of the row, the letter appears in.

    for example, i do schedules.. say. 50 people, my form…
    I want it to search the row next to employee. When it finds a " B ".
    Input the time at the top of the column.

    trying to add an attachment.. but not sure it worked here.

    hope this is clear

    THX

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,926

    Re: need help to search a column, find a letter, and return the number at the top of the r

    sorry, not very clear, and no attachment came through
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    04-11-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: need help to search a column, find a letter, and return the number at the top of the r

    ok, for some reason nothing is being attached in here.... so i did copy paste... the top row are times.... the rows below are schedules in 15 min intervals.. i want it to search a row, look for a " B ", the call up the time in the top row... EG. the first 9, time is 9:45... hope thats more clear??

    9:30 9:45 10:00 10:15 10:30 10:45 11:00 11:15 11:30

    1 B 1 1 1 1 1 1 1
    1 1 1 1 1 1 1 1 B

  4. #4
    Registered User
    Join Date
    04-11-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: need help to search a column, find a letter, and return the number at the top of the r

    ok, i managed to attach a file... thanks
    Attached Files Attached Files

  5. #5
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: need help to search a column, find a letter, and return the number at the top of the r

    To find the first "B" in A3:Z3 and return the corresponding value from A1:Z1 try this formula

    =INDEX(A$1:Z$1,MATCH("B",A3:Z3,0))

    adjust ranges as required and copy down for subsequent rows
    Audere est facere

  6. #6
    Registered User
    Join Date
    04-11-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: need help to search a column, find a letter, and return the number at the top of the r

    humm, no, that doesnt seem to work.... so it needs to search along row 4, when it finds a " B ", it calls up the time in the top of the column " 9:00 "

  7. #7
    Forum Expert daddylonglegs's Avatar
    Join Date
    01-14-2006
    Location
    England
    MS-Off Ver
    2016
    Posts
    14,675

    Re: need help to search a column, find a letter, and return the number at the top of the r

    Clearly you can do the same with row 4 - did you try this version?

    =INDEX(A$1:Z$1,MATCH("B",A4:Z4,0))

    That finds the first "B" in A4:Z4 and returns the corresponding value from row 1

  8. #8
    Registered User
    Join Date
    04-11-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: need help to search a column, find a letter, and return the number at the top of the r

    yes, that actually seemed to work, thanks alot..... when I coppied it down though, i had a few " #N/A " pop up? any idea why?

  9. #9
    Registered User
    Join Date
    04-11-2012
    Location
    Canada
    MS-Off Ver
    Excel 2007
    Posts
    14

    Re: need help to search a column, find a letter, and return the number at the top of the r

    ok, I think i figure out how this is working now... thanks alot... that was a big help

+ 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