EXCEL problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Formulawiz
    Restricted User
    • 01-12-09
    • 1589

    #1
    EXCEL problem
    IAN KENNEDY is in a column in EXCEL worksheet A. The stats which is IP is in another worksheet B. I am trying to use the VLOOKUP but I cant get it to work properly.

    Worksheet A has for example IAN KENNEDY
    WORKSHEET B has IAN KENNEDY in cell A1
    Cell A5 has IP
    CELL B5 has the value 74.1 innings pitched. How do I capture the value in cell B5 which is the inning pitched.
    I know how to use VLOOKUP as follows
    =VLOOKUP(B22,$AQ$1:$AR$30,2,FALSE) but how do I get the value above
    Thanks



    Last edited by Formulawiz; 05-27-11, 06:18 PM.
  • borgsta
    SBR High Roller
    • 04-11-11
    • 110

    #2
    IMO you are betting off using SUMIF argument and naming the tables.

    So in your example you would name the table in Worksheet B from A1-Z1 as 'Pitchers'
    Then name the table in Worksheet B from A5-Z5 as 'IP' (this is assuming you have pitchers named from left to right and their respective innings pitched also from left to right)

    Then in Worksheet A you can use the following

    =SUMIF(Pitchers,A1,IP)

    A1 in this example is where the pitchers name is in Worksheet A.

    If you need a mock draft I can upload an excel sheet or upload yours and I can play with it.
    Comment
    • Formulawiz
      Restricted User
      • 01-12-09
      • 1589

      #3
      Attached is the excel worksheet. Sheet 1 has the pitchers name and I want to get the value from sheet 2 thats in IP cell B42 which is the innings pitched. what formula would I use. remember sheet 1 will have all the pitchers in MLB and sheet 2 will have all the ARI pitchers, page 3 all the ATL pitchers and etc. When sheet 2 updates the query some of the cells can move around.
      Thanks
      Attached Files
      Comment
      • borgsta
        SBR High Roller
        • 04-11-11
        • 110

        #4
        Ah ok, if it is using queries and moving cells around than the simple function I provided above won't work.

        You will probably need a macro / formula going on to search for the value of IP and put it in a master table somewhere. A bit over my head unfortunately.
        Comment
        • RickySteve
          Restricted User
          • 01-31-06
          • 3415

          #5
          Write a script to munge what you're looking for.
          Comment
          • mrtomk
            SBR High Roller
            • 02-24-11
            • 105

            #6
            Yea, you'll most likely need a macro for this. I'm pretty inexperienced with them but am trying to learn vba programming at the moment, so I thought Id have a stab at your problem, attached.

            To view the code I've used, press Alt-F11. Ive tried to add a bit of explanation to it. There may be a more streamlined way of doing it, as I used a lot of trial and error to finally get there.

            The macro should look through the sheet names for the club initials in column B, then find the pitcher name in that sheet, and look down and across the 41/1 rows/columns to give the IP stat. Itll then loop down through all the pitchers in the list.

            Let me know how it goes...
            Attached Files
            Comment
            • Formulawiz
              Restricted User
              • 01-12-09
              • 1589

              #7
              Originally posted by mrtomk
              Yea, you'll most likely need a macro for this. I'm pretty inexperienced with them but am trying to learn vba programming at the moment, so I thought Id have a stab at your problem, attached.

              To view the code I've used, press Alt-F11. Ive tried to add a bit of explanation to it. There may be a more streamlined way of doing it, as I used a lot of trial and error to finally get there.

              The macro should look through the sheet names for the club initials in column B, then find the pitcher name in that sheet, and look down and across the 41/1 rows/columns to give the IP stat. Itll then loop down through all the pitchers in the list.

              Let me know how it goes...
              It works fine but there has to be a way to do it with excel functions such as HLOOKUP or etc.
              Thanks for your help but I dont understand programming. There are many other stats I want to capture besides innings pitched (IP).
              Comment
              • tomcowley
                SBR MVP
                • 10-01-07
                • 1129

                #8
                Originally posted by Formulawiz
                WORKSHEET B has IAN KENNEDY in cell A1
                Cell A5 has IP
                CELL B5 has the value 74.1 innings pitched.
                Really?
                Comment
                • tomcowley
                  SBR MVP
                  • 10-01-07
                  • 1129

                  #9
                  Good god. Excel isn't made to handle trash like that, much less trash that isn't even going to be in the same cells consistently. Extract what you want, then use excel.
                  Comment
                  • mrtomk
                    SBR High Roller
                    • 02-24-11
                    • 105

                    #10
                    If it was as simple as an hlookup, you'd have done it by now. Or, at least, someone else would've done it for you by now.

                    See formula in attached sheet (for some reason when I pasted it in here it left spaces in the formula and it wouldnt work when I tried to copy it back to excel)

                    Word of warning, if you are going to use formulae similar to the above for lots of other stats, for all the players, on all the teams in baseball, and keep them in the same workbook as all your data, your file is going to be enormous; Excel will shiit itself, literally, out of fear at the file size, and as a dirty protest against what you are asking from it.

                    As the poster above mentioned, you're life would be a lot simpler if you structured your data in a nicer way .
                    Attached Files
                    Last edited by mrtomk; 06-01-11, 01:53 PM.
                    Comment
                    SBR Contests
                    Collapse
                    Top-Rated US Sportsbooks
                    Collapse
                    Working...