+ Reply to Thread
Results 1 to 9 of 9

Need To Find Text And Output Corresponding Number

  1. #1
    Registered User
    Join Date
    03-16-2013
    Location
    United States
    MS-Off Ver
    Excel 2002
    Posts
    5

    Need To Find Text And Output Corresponding Number

    Hey guys, I've got a problem that I'm hoping you can help me with. I need a formula for column G. I want the formula to look at column F, match it up with the data from columns A-D and output the corresponding number.

    So for example, in cell G2 I want it to look at F2 and see "a West Brom". Then I want it to search columns A-D for "a West Brom" and find it in A9. Then I want it to look at the corresponding cell (in this case B9) and output the value of the corresponding cell. So in G2, I want it to output 0.93.

    Is this possible? If so, can you show me how?

    Thanks in advance.

    Sample Workbook.xls

  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
    53,053

    Re: Need To Find Text And Output Corresponding Number

    Hi and welcome to the forum

    try this, copied down...

    =VLOOKUP(F2,$A$2:$D$21,2,FALSE)
    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
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Need To Find Text And Output Corresponding Number

    @FD, just a heads-up - I had the OPs workbook open, so copied your formula in - it's only finding/returning matches from Column A, although some of the matches are in Column C (and of course I've no idea why).
    Brendan.


    __________________________________________________________________________________________________
    Things to consider:

    1) You can thank any poster by clicking the * at the left of a helpful post.
    2) You can help to keep the forum tidy by marking your thread as "Solved", if it has been answered to your satisfaction.
    3) Help us to help you, by uploading a sample workbook, showing the type of data you're dealing with, and clearly indicating what the results should be.

  4. #4
    Registered User
    Join Date
    03-16-2013
    Location
    United States
    MS-Off Ver
    Excel 2002
    Posts
    5

    Re: Need To Find Text And Output Corresponding Number

    Okay I tried that and it worked for all of the "a Team Name" values but not for the "v Team Name" ones. I assumed that had something to do with my inconsistent placing (or not placing) of a period after v so I fixed it and removed all the periods but I'm still getting #N/A for those values.

  5. #5
    Registered User
    Join Date
    03-16-2013
    Location
    United States
    MS-Off Ver
    Excel 2002
    Posts
    5

    Re: Need To Find Text And Output Corresponding Number

    Quote Originally Posted by BB1972 View Post
    @FD, just a heads-up - I had the OPs workbook open, so copied your formula in - it's only finding/returning matches from Column A, although some of the matches are in Column C (and of course I've no idea why).
    I had them separated to differentiate between home and away matches. Would it help if I moved them into one column?

  6. #6
    Valued Forum Contributor
    Join Date
    07-27-2012
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2010
    Posts
    826

    Re: Need To Find Text And Output Corresponding Number

    Quote Originally Posted by Steve9383 View Post
    I had them separated to differentiate between home and away matches. Would it help if I moved them into one column?
    Hey Steve - absolutely - this can be solved right now if you do that.

  7. #7
    Registered User
    Join Date
    03-16-2013
    Location
    United States
    MS-Off Ver
    Excel 2002
    Posts
    5

    Re: Need To Find Text And Output Corresponding Number

    Okay I did that and it worked. Thanks guys!

  8. #8
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Need To Find Text And Output Corresponding Number

    In G2 enter:

    =VLOOKUP(F2,A$2:B$21,2,FALSE) and copy down
    Gary's Student

  9. #9
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,823

    Re: Need To Find Text And Output Corresponding Number

    =IFERROR(VLOOKUP(F2,A$2:B$21,2,FALSE),VLOOKUP(F2,C$2:D$21,2,FALSE))
    Try to use this formula if you use excel 2007 or later.
    Earlier version use :
    =IF(ISERROR(VLOOKUP(F2,A$2:B$21,2,FALSE)),VLOOKUP(F2,C$2:D$21,2,FALSE),VLOOKUP(F2,A$2:B$21,2,FALSE))
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

+ 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