Consulting

Results 1 to 4 of 4

Thread: Seperating records with a blank line

  1. #1

    Seperating records with a blank line

    Afternoon All,

    I have a spreasheet that holds a field called 'Enquiry Number'. I have sorted the spreadsheet by Enquiry Number and usually there are two records always grouped together, one for a created date, the other for a closed date.

    I want to be able to seperate the first two records with a blank line, then the next two records etc etc. how would I do this using VB with a command button.

    Any help would be appriecated.

    Regards,

    Mattster

  2. #2
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    There are a lot of Excel functions that assume that your data is layed out with no empty rows between rows of data.
    Also, if you are sorting frequently, the empty buffer rows will need to be inserted after every sort.
    Have you consided using Conditional formatting to make the border thick between rows with different Enquiry Numbers?

  3. #3
    Hi Mike,

    That doesnt seem like a bad idea, however I wanted the blank line also because I have a datedif formula working out the difference between the created record and the closed record. This way I can insert the total elasped time in the column of the balnk line.

  4. #4
    VBAX Tutor
    Joined
    Aug 2007
    Posts
    273
    Location
    you could create a third line for each data series with this total time information, but it might be better to add a column to the close data record, where you store this time. Then separate your records with a boarder line. i agree with mikerickson that you don't want to have blank rows in and table, for it makes a lot of filtering and sorting a lot harder to do.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •