+ Reply to Thread
Results 1 to 4 of 4

Macro to Count the number of Rows between a text value that occurs mutliple times

  1. #1
    Registered User
    Join Date
    10-22-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Macro to Count the number of Rows between a text value that occurs mutliple times

    Hi,

    I have been giving the task of sorting through a .CSV file that has a lot of raw data (over 350k lines) and need to be able to find the number of rows / lines of an invoice that sales people have invoiced.

    So as an example :

    863200
    863200
    863200
    359907
    TOTAL FO
    863200
    863200
    863200
    TOTAL FO
    361268
    361268
    361268
    TOTAL FO

    I need to be able to count how many rows / cells are between each occurrence of "TOTAL FO" and have the value (the number of rows/ cells)added to a column in another worksheet.

    Thank you.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Macro to Count the number of Rows between a text value that occurs mutliple times

    shor us the desired result please
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    10-22-2012
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Macro to Count the number of Rows between a text value that occurs mutliple times

    So the Total for Each employee number is next to the email number in a separate worksheet.

    Colunn A Column C (In Another worksheet) Column D (In The same worksheet as Column C)

    863200 TOTAL FOR 102 3
    863200 TOTAL FOR 111 3
    863200
    TOTAL FOR 102
    361268
    361268
    361268
    TOTAL FOR 111
    602627
    TOTAL FOR 910

    Basically so I can then convert the numbers into a graph.

  4. #4
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Macro to Count the number of Rows between a text value that occurs mutliple times

    See if this workbook helps, no VBa required.
    Attached Files Attached Files
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

+ 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