Excel Lookup Help

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • benjy
    SBR MVP
    • 02-19-09
    • 2158

    #1
    Excel Lookup Help
    I'm trying to use vlookup (or some other excel function) to nab data on starters from an excel worksheet I've compiled. After running a query from Pinny my hitting data "looksup" just fine, but due to Pinny using initials and my worksheet using full given names (e.g. B. Zito vs. Barry Zito) I can't get it to work.

    Any help would be appreciated. Thanks.
  • TomG
    SBR Wise Guy
    • 10-29-07
    • 500

    #2
    You need your lookups to match exactly (the format of the cell must match as well). So create another column next to Barry Zito and use a formula like =LEFT(A3,1) & "." & MID(A3, FIND(" ", A3, 1), 99). That will take Barry Zito and turn it into B. Zito (where A3 is the pitcher's name)
    Comment
    • uva3021
      SBR Wise Guy
      • 03-01-07
      • 537

      #3
      you can also use

      =REPLACE(A1,2,FIND(" ",A1)-1,". ")

      The VLOOKUP function requires text to be in alphabetical order for most accurate lookup results

      With extracting data from Pinny, I would suggest to make a macro that on run copies the relevant cells into another sheet then you can manipulate the data from there so running a query from pinny won't disrupt the data
      Comment
      • benjy
        SBR MVP
        • 02-19-09
        • 2158

        #4
        Thanks so much guys!
        Comment
        • skrtelfan
          SBR MVP
          • 10-09-08
          • 1913

          #5
          How do you get around errors that result when two pitchers have the same first initial and last name, i.e. Jim Johnson on the Orioles and Josh Johnson on the Marlins, I guess you need to add the team's name into the lookup function somehow?
          Comment
          • benjy
            SBR MVP
            • 02-19-09
            • 2158

            #6
            Originally posted by skrtelfan
            How do you get around errors that result when two pitchers have the same first initial and last name, i.e. Jim Johnson on the Orioles and Josh Johnson on the Marlins, I guess you need to add the team's name into the lookup function somehow?

            There will have to be some customization. Pinny isn't entirely consistent with a single initial for first name, likely to avoid the confusion you've noted. I'll first check for duplicates (like you're example) and then alter the name entries to match Pinny as discrepencies come up. It's a little bit of work but still sooooo much easier than finding, copying and pasting each and every starter each day.
            Comment
            • mminkovski
              SBR MVP
              • 06-22-07
              • 1077

              #7
              you could consolidate pitcher name and team name before running vlookup
              Comment
              • benjy
                SBR MVP
                • 02-19-09
                • 2158

                #8
                Originally posted by mminkovski
                you could consolidate pitcher name and team name before running vlookup
                Good idea but pitchers have changed teams and I like that my database shows where they have played (and posted their stats) in the past.
                Comment
                SBR Contests
                Collapse
                Top-Rated US Sportsbooks
                Collapse
                Working...