+ Reply to Thread
Results 1 to 6 of 6

Finding text in an array but not always in same place and returning adjacent cell value

  1. #1
    Registered User
    Join Date
    07-13-2014
    Location
    Wirral, UK
    MS-Off Ver
    Microsoft Office 2010
    Posts
    3

    Finding text in an array but not always in same place and returning adjacent cell value

    Hi there, I'm trying to automate a process that I've always done manually in the past.

    I look after the weekly scores from a quiz league and receive a worksheet with the names of the teams and their scores.

    The problem I have is that not all teams compete each week so their names and scores are not always there.

    How can I get excel to look for a team name in a column and return the score of the adjacent cell into a different worksheet and next to the correct team name.

    I thought I had it using simple IF functions but no progress there.

    Can anyone suggest a way of doing this please.

    I've got up to 600 team names now so it's a nightmare doing it by hand.

    Thanks in advance.

    ps this is the first time I've ever posted anything on an online forum so I hope I haven't broken any rules.

    TB

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,106

    Re: Finding text in an array but not always in same place and returning adjacent cell valu

    Think you're looking for VLOOKUP.


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Registered User
    Join Date
    07-13-2014
    Location
    Wirral, UK
    MS-Off Ver
    Microsoft Office 2010
    Posts
    3

    Re: Finding text in an array but not always in same place and returning adjacent cell valu

    Hi TMS, many thanks for that. I've taken a look at VLOOKUP and applied it.
    Works well.
    If used it in the following formula...
    =IF(ISBLANK(A2),"",VLOOKUP(A4,wk1scores,2,FALSE))

    Works perfectly but returns #N/A for teams that haven't played ie the teams that don't appear on the list on any given week.

    Would you know how to refine the formula to return a '0' instead of the #N/A?

    This would make summing the scores easier without manually changing each cell.

    Thanks,

    TB

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,106

    Re: Finding text in an array but not always in same place and returning adjacent cell valu

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    or a little shorter:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    I note you are using A2 for the test and then A4 for the VLOOKUP. Is that what you intended?


    Regards, TMS

  5. #5
    Registered User
    Join Date
    07-13-2014
    Location
    Wirral, UK
    MS-Off Ver
    Microsoft Office 2010
    Posts
    3

    Re: Finding text in an array but not always in same place and returning adjacent cell valu

    Hi TMS,

    Thanks Again.

    The A4 ref is in error, both should read A2.

    That's nice and tidy now.

    Would you recommend some reading for me here.

    I'm self taught on the areas I've needed for work and hence many gaps.

    Cheers,

    TB

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    49,106

    Re: Finding text in an array but not always in same place and returning adjacent cell valu

    You're welcome

    Knock yourself out

    http://www.youtube.com/user/ExcelIsFun


    Regards, TMS



    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Finding Max value in column and returning value from left adjacent cell
    By Haidar123 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 01-17-2019, 03:33 AM
  2. [SOLVED] code to recognize text in a cell and place corresponding info in adjacent cell
    By m1980rae in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-22-2013, 05:05 PM
  3. Replies: 2
    Last Post: 10-12-2012, 11:38 PM
  4. [SOLVED] Finding a name, then returning adjacent cell values
    By The Drone in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 05-09-2012, 06:36 AM
  5. Top N List based on 2 conditions & returning adjacent cell text
    By Kooey in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-26-2011, 11:58 AM

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