+ Reply to Thread
Results 1 to 11 of 11

Count Word Occurrences from a different tab

  1. #1
    Registered User
    Join Date
    11-29-2012
    Location
    ystfast
    MS-Off Ver
    Excel 2010
    Posts
    52

    Count Word Occurrences from a different tab

    How could this be written in VBA?

    Please Login or Register  to view this content.

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Count Word Occurrences from a different tab

    It is written in VBA, is it not? Maybe you are just looking for an alternative. Here is one of many ways:

    Please Login or Register  to view this content.

  3. #3
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,918

    Re: Count Word Occurrences from a different tab

    Please Login or Register  to view this content.
    Ben Van Johnson

  4. #4
    Registered User
    Join Date
    11-29-2012
    Location
    ystfast
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Count Word Occurrences from a different tab

    I dig it, thank-you,

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    11-29-2012
    Location
    ystfast
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Count Word Occurrences from a different tab

    If I had 10 cells to do this in, what would be the best way? Create 10 separate Subs?

  6. #6
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Count Word Occurrences from a different tab

    What cells do you want to do it in and do you still want to look through the same column? Honestly using the countif function you submitted is probably going to be best, i just figured I would show you a different way.

  7. #7
    Registered User
    Join Date
    11-29-2012
    Location
    ystfast
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Count Word Occurrences from a different tab

    I will look at more then 10 different worksheets to return the "counts" from each tab (just used 10 as an example). AL was B2, AR will be B3, CA will be B4, etc. I have to get the formulas off the spreadsheet, people just do not understand 'do not delete columns'. Trying to create multiples now.

    This works, but wanted to know if there was a way to shorten it, before I create 52 separate Subs.

    Please Login or Register  to view this content.
    Last edited by Jaypelt; 03-01-2013 at 06:58 PM.

  8. #8
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Count Word Occurrences from a different tab

    you arent going to need 52 different subs. I just don't clearly understand what you are trying to do at this point so I can't write it into 1 vba script. Maybe this is what you need (you will definitely need to adjust to match your needs):

    Please Login or Register  to view this content.

  9. #9
    Registered User
    Join Date
    11-29-2012
    Location
    ystfast
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Count Word Occurrences from a different tab

    I have 50+ tabs on a worksheet, all state/country abbreviations. In one column on my Metrics tab I am counting the number of times the word Manual appears, and in another column the number of times Yes appears from each of the state/country tabs. I had formulas written in the cells, I am trying to remove them since so many people are in and out of the worksheet, and to prevent corruption of the data.

    I will try the suggestion that has been added a little later.

  10. #10
    Registered User
    Join Date
    11-29-2012
    Location
    ystfast
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Count Word Occurrences from a different tab

    When I run this in Debug it works fine, all the cells populate, but it does not refresh. Would I have to use Ctrl + "whatever" to prompt it, or is there a way to make it automatic?

    Please Login or Register  to view this content.

  11. #11
    Registered User
    Join Date
    11-29-2012
    Location
    ystfast
    MS-Off Ver
    Excel 2010
    Posts
    52

    Re: Count Word Occurrences from a different tab

    I got this working perfectly with some adjustments, just how I want it. Thank-you for the help.

    Please Login or Register  to view this content.

+ 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