+ Reply to Thread
Results 1 to 2 of 2

Reading specific text question

  1. #1
    Registered User
    Join Date
    03-15-2007
    Posts
    53

    Reading specific text question

    Ok what I am trying to do is import NBA play by plays into excel (done that part) then read through them for assists in the first half.
    The following is a small example of the data I'll be using

    Pachulia Rebound (Off:0 Def:1)
    Pachulia Layup Shot: Missed

    Williams Jump Shot: Missed
    Smith Rebound (Off:1 Def:0)
    Smith Layup Shot: Missed
    Smith Rebound (Off:2 Def:0)

    Johnson Jump Shot: Made (2 PTS)
    Assist: Pachulia (1 AST)

    Johnson Jump Shot: Missed
    Smith Layup Shot: Made (2 PTS)

    Smith Rebound (Off:3 Def:0)

    Williams Rebound (Off:0 Def:1)
    Williams Jump Shot: Made (2 PTS)
    Assist: Smith (1 AST)

    Williams 3pt Shot: Made (5 PTS)
    Assist: Johnson (1 AST)

    Williams Rebound (Off:0 Def:2)
    Williams Jump Shot: Made (7 PTS)
    Assist: Childress (1 AST)

    This information is in a column the other team's stats in another column.
    My question is : Is there some function that will read through the text of a given column and ignore everything but a given word (AST = assist for example) then return the number of times it has found it within that column?
    If not....could someone please guide me another way. Thanks in advance for any help.
    Last edited by VBA Noob; 03-15-2007 at 03:04 PM.

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    This should work for you. It will count the number of occurrences of "AST" in the range A1:A26. This assumes "AST" is the three leftmost characters in a given cell. Change your range as necessary.

    =SUMPRODUCT(--(LEFT(A1:A26,3)="AST"))

+ 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