Exported data to Excel 2007 has spaces between rows

Discussion in 'Microsoft Excel Discussion' started by Tony O, Aug 11, 2012.

  1. Tony O

    Tony O Guest

    I am copying and pasting from one Excel 2007 spreadsheet to another.

    The starting spreadsheet is a pivot table. There are many things
    going on in the background
    (I did not create original Excel spreadsheet).

    Each row has a group name. For example, group 1000 is the first
    group, 1001 is the second, etc.
    Each group should show up may times from one row to the next. For
    example,

    Group account
    1000 ABC
    1000 DEF
    1000 GHI
    1001 ABC
    1001 DEF
    1002 ABC
    1002 DEF

    When the system has the same group number repeat, it only shows up one
    time, for example:
    Group account
    1000 ABC
    DEF
    GHI
    1001 ABC
    DEF
    1002 ABC
    DEF

    Is there a way to get the account to automatically fill in with the
    cell above when it is blank for the
    current cell, so it looks like the first output above, where all the
    group numbers are filled in correctly?

    There are hundreds of group/account combinations and an easier way
    that doing this manually will be a
    big help.

    Please let me know.
     
    Tony O, Aug 11, 2012
    #1
    1. Advertisements

  2. Tony O

    Claus Busch Guest

    Hi Tony,

    Am Sat, 11 Aug 2012 14:11:46 -0700 (PDT) schrieb Tony O:

    > When the system has the same group number repeat, it only shows up one
    > time, for example:
    > Group account
    > 1000 ABC
    > DEF
    > GHI
    > 1001 ABC
    > DEF
    > 1002 ABC
    > DEF
    >
    > Is there a way to get the account to automatically fill in with the
    > cell above when it is blank for the
    > current cell, so it looks like the first output above, where all the
    > group numbers are filled in correctly?


    your group numbers in column A, then

    Sub FillValues()
    Dim R As Range
    For Each R In Range("A2", Range("A" & Rows.Count).End(xlUp))
    If IsEmpty(R) Then R = R.Offset(-1)
    Next
    End Sub


    Regards
    Claus Busch
    --
    Win XP PRof SP2 / Vista Ultimate SP2
    Office 2003 SP2 /2007 Ultimate SP2
     
    Claus Busch, Aug 11, 2012
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Joseph Geretz

    Can worksheet data be exported/imported to/from flat file?

    Joseph Geretz, Nov 27, 2003, in forum: Microsoft Excel Discussion
    Replies:
    6
    Views:
    213
    Homer
    Nov 28, 2003
  2. a
    Replies:
    1
    Views:
    260
    Amedee Van Gasse
    Mar 25, 2005
  3. Guest

    Data Exported from Access to Excel

    Guest, May 4, 2006, in forum: Microsoft Excel Discussion
    Replies:
    3
    Views:
    129
    Guest
    May 4, 2006
  4. Lumpjaw

    RE: Excel data exported to custom Outlook form

    Lumpjaw, Nov 18, 2006, in forum: Microsoft Excel Discussion
    Replies:
    11
    Views:
    295
    Lumpjaw
    Nov 20, 2006
  5. Vilius Mockûnas

    Data exported to excel 2007 changes cell number format to 'general' ?

    Vilius Mockûnas, Jun 25, 2009, in forum: Microsoft Excel Discussion
    Replies:
    1
    Views:
    1,088
    Shane Devenshire
    Jun 28, 2009
Loading...

Share This Page