Results 1 to 17 of 17

String of Text into Box Score Format (Baseball Data)

Threaded View

  1. #1
    Registered User
    Join Date
    07-24-2013
    Location
    Canada
    MS-Off Ver
    Excel 2016
    Posts
    38

    String of Text into Box Score Format (Baseball Data)

    Hey,

    Need some help with this one. Either formulas or VBA code, doesn't matter which (thinking VBA would be the best option. Am running Excel 2016), but I'll try to explain what I have here:

    A1 = "Team Names", B1 = "Box Score Data"
    A2 = MILCIN, B2 = 102200322400500600730800910R64H89E01

    Let's assume I have a list of these types of strings filling down the A and B columns. What I would like is some code that would essentially transform the above data (in a new sheet if that helps) into something like the below format:

    ------1st--2nd--3rd--4th--5th--6th--7th--8th--9th--R--H--E
    MIL---0----0-----2----0----0----0-----3----0----1----6--8--0
    CIN---2----0-----2----0----0----0-----0----0----0----4--9--1

    (You can see this data in the string. And obviously the dashes are for readability. These would all be in their own columns)

    Sometimes there might be games that go into extra innings, so that string could go past 9 innings, so it would need to understand what the 10th, 11th, etc. innings were. I was thinking of something that could extract everything from the R and to the right, leaving the string for scores and innings left, but I don't know how to transform that. The team names as well. For those, I could have a list of the teams abbreviations, and then have some code that would split the string depending on matching from the list? (If that makes sense). And it would need to loop through the entire list down.

    Any ideas? Let me know if I can answer any more questions. Thanks a lot for your help!

    windowshopr
    Attached Files Attached Files
    Last edited by windowshopr; 07-01-2018 at 01:59 AM.

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 3
    Last Post: 02-17-2016, 10:04 AM
  2. Macro to save text string as an MS-DOS format text document
    By bwink88 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-16-2013, 02:25 PM
  3. Parse, Clean and Format Address Data from Text String
    By jerrydiaz in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 12-04-2013, 11:52 AM
  4. Conditional format: mark cells with 1 text string & exclude cells with another string
    By KArnoldColumbia in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 11-15-2013, 01:43 AM
  5. [SOLVED] Returning Match Score From A String
    By clattenburg cake in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-02-2013, 01:38 PM
  6. How to parse a baseball box score
    By 327 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-06-2012, 05:09 AM
  7. Replies: 2
    Last Post: 03-20-2012, 06:30 PM

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