+ Reply to Thread
Results 1 to 7 of 7

Is it possible to separate and count lines in a column

  1. #1
    Registered User
    Join Date
    12-01-2011
    Location
    Mountain View, Ca, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Is it possible to separate and count lines in a column

    Is it possible to have a macro or program do the following:
    Scan the lines on a given column when a difference is found in the from one line to the next to insert a blank line (preferably 2), total the number of lines that were just "scanned", move on the next line and repeat the procedure? I have about 600 lines to do.

    Dave

  2. #2
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Is it possible to separate and count lines in a column

    Hello and welcome to the forum,

    The scenario you propose sounds very possible using vba. If this acceptable for you, then please post a before and after example.

    Good luck.

    abousetta
    Please consider:

    Thanking those who helped you. Click the star icon in the lower left part of the contributor's post and add Reputation.
    Cleaning up when you're done. Mark your thread [SOLVED] if you received your answer.

  3. #3
    Registered User
    Join Date
    12-01-2011
    Location
    Mountain View, Ca, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Is it possible to separate and count lines in a column

    Sorry, messed up my post.

  4. #4
    Registered User
    Join Date
    12-01-2011
    Location
    Mountain View, Ca, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Is it possible to separate and count lines in a column

    Sorry again, I finally figured out how to upload a sample.
    Attached Files Attached Files
    Last edited by David2011; 12-02-2011 at 01:02 AM.

  5. #5
    Registered User
    Join Date
    11-23-2011
    Location
    George, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    10

    Re: Is it possible to separate and count lines in a column

    Why not use the standard excel funtion under Data named Subtotal. For every break in specified data, you can do a function like sum or count on another column.

    It can do exactly what you are looking for. It wil also group the data so that you could minimize the detail and only get the totals.
    Attached Files Attached Files
    Last edited by Leamc; 12-02-2011 at 02:18 AM.

  6. #6
    Registered User
    Join Date
    12-01-2011
    Location
    Mountain View, Ca, USA
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: Is it possible to separate and count lines in a column

    Good news, bad new. The good news is your idea produced exactly what I asked for. The bad news is when I turned in the finished product I got the old "that's good but what I really need is..."
    Thanks for you help. Guess I'll have to put up a new post with a question about my new request.

  7. #7
    Forum Guru
    Join Date
    03-12-2010
    Location
    Canada
    MS-Off Ver
    2010 and 2013
    Posts
    4,418

    Re: Is it possible to separate and count lines in a column

    So what's missing from the 'perfect solution'? I guess you are doing this for someone else since you are using the third-person?

    abousetta

+ 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