+ Reply to Thread
Results 1 to 5 of 5

Tagged word / phrase count VB help please

  1. #1
    Registered User
    Join Date
    09-08-2016
    Location
    Middlesbrough
    MS-Off Ver
    2010
    Posts
    7

    Tagged word / phrase count VB help please

    Hi all,

    I am using the following VB code (which i didn't write) to count occurrence of individual words contained in all the rows in column A to help look for trends.

    Please Login or Register  to view this content.
    This works well but in reality i need it to be altered (very much like the tags on this forum) so that it will look at all rows in column A and recognise that tags are separated by # so for example a row could contain:

    #housing #VOIDS #rent arrears #new builds

    The code would need to return everything to the right of the # as a separate tag until it found another tag or until the cell was empty.

    This would be an example of a few rows of data in column A:


    ROW 1 #housing #VOIDS #rent arrears #new builds
    ROW 2 #housing #arrears #tenant support
    ROW 3 #assisted living #payments
    ROW 4 #insurance
    ROW 5 #supported housing #tenant support

    For this data the VB should return the following

    housing 2
    VOIDS 1
    rent arrears 1
    new builds 1
    arrears 1
    assisted living 1
    payments 1
    insurance 1
    supported housing 1
    tenant support 2

    Any help would be very much appreciated.

    Thank you in advance.
    Last edited by fairlo; 09-08-2016 at 05:33 AM.

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,607

    Re: Tagged word / phrase count VB help please

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here



    (This thread should receive no further responses until this moderation request is fulfilled, as per Forum Rule 7)

  3. #3
    Registered User
    Join Date
    09-08-2016
    Location
    Middlesbrough
    MS-Off Ver
    2010
    Posts
    7

    Re: Tagged word / phrase count VB help please

    Apologies, i have added the tag as required. Sorry again

  4. #4
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Tagged word / phrase count VB help please

    Try
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    09-08-2016
    Location
    Middlesbrough
    MS-Off Ver
    2010
    Posts
    7

    Re: Tagged word / phrase count VB help please

    Capture.PNG

    Absolutely perfect.

    Thank you so much :-)

+ 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. Include random word from the word list with a phrase as suffix or prefix
    By faizzsheikh in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 03-10-2016, 05:53 AM
  2. [SOLVED] can't search word or phrase in my database
    By kensho in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 06-15-2015, 06:01 AM
  3. [SOLVED] Search using a Word/Phrase
    By hiteshasrani43 in forum Excel Programming / VBA / Macros
    Replies: 20
    Last Post: 03-05-2015, 01:02 AM
  4. Replies: 5
    Last Post: 10-15-2014, 03:38 PM
  5. Highlighting a word or phrase
    By bishoposiris in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-29-2013, 11:11 PM
  6. [SOLVED] Returning Value if cell contains certain word/phrase
    By Montoro22 in forum Excel General
    Replies: 4
    Last Post: 08-13-2012, 03:35 PM
  7. Translate a word into a phrase.
    By STSOM in forum Excel General
    Replies: 1
    Last Post: 01-02-2009, 11:19 AM

Tags for this Thread

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