+ Reply to Thread
Results 1 to 2 of 2

Copying 5000 names to blank cells in data column

  1. #1
    Forum Contributor
    Join Date
    06-10-2004
    Posts
    121

    Copying 5000 names to blank cells in data column

    Hi guys

    I have imported data into excel, approximately 5000 records. Each record can occupy several lines. Column A is the persons name so consequently there are several blank cells under each name, and the number of blanks varies depending on the size of the individual record,

    I wish to sort by column A and keep the records intact, the simple solution is to individually copy the name to each blank cell underneath it, but there are 5000 so it would take forever. Is there a formula I could use to, or would it be possible to use something like subtotal to do the sort?

    Thanks in advance

  2. #2
    Forum Expert Ron Coderre's Avatar
    Join Date
    03-22-2005
    Location
    Boston, Massachusetts
    MS-Off Ver
    2013, 2016, O365
    Posts
    6,996

    Re: Copying 5000 names to blank cells in data column

    Try this

    • Select from the first person's name down through the last blank cell associated with the last person's name

    Select the blank cells
    • Press the [F5] key
    ...Click: [special cells...]
    ...Check: Blanks
    ...Click: OK

    While only the blank cells are selected...
    put a formula in each that references the cell above it
    • Type: =
    • Press the UP arrow key one time
    • Hold down CTRL while you press ENTER

    Select all of the name cells
    • Select the first person's name
    • Hold down SHIFT
    ...Press END
    ...Press the DOWN arrow key
    ...Release the SHIFT key

    While still selected...Convert all of those cell formulas to values
    • CTRL+C
    •• Excel 2007: Home.Paste.Paste_values
    •• Excel 2003: Edit.Paste_Special....Check: values

    Now you can sort the records

    If you wnat the record sorted by name AND in the original order under that name:
    • Insert a blank column before the Name data
    • In the blank cell to the left of the first name...Enter a 1
    • Select from that cell down through the last blank cell next to a name
    •• Excel 2007: Home.Fill.Series...Click: OK
    •• Excel 2003: Edit.Fill.Series...Click: OK

    Now sort by Name and seq num

    Does that help?
    Ron
    Former Microsoft MVP - Excel (2006 - 2015)
    Click here to see the Forum Rules

+ 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