+ Reply to Thread
Results 1 to 13 of 13

Repeat cell above (fill blank)

  1. #1
    Registered User
    Join Date
    01-28-2008
    Posts
    7

    Repeat cell above (fill blank)

    I have a worksheet with a column with words, but a lot od the cells are empty. I want these replaced with the word above. I know I can do this with fill handle, but as there are thousands, it would help with a routine - a program - that I could run on the column and thus fill out all the empty cells.
    Thanks.

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    See link

    http://www.contextures.com/xlDataEntry02.html

    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    01-28-2008
    Posts
    7

    No blanks found

    Thanks for the program on the web, but it didn't work for me. I got the message "No blanks found", probably something I did wrongly, but what?
    Any idea?
    Thanks
    Jan Surrey

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Try the manual option or Post a sample file

    VBA Noob

  5. #5
    Registered User
    Join Date
    01-28-2008
    Posts
    7
    Thanks for your help. I tried the manual ones, but did not quite know how to - I am using Excel 2007. Here is a sample from the file.
    Thanks
    Attached Files Attached Files

  6. #6
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Please note not everyone has xl2007 so best to save as xl2000. I have the viewer so could view your file

    Select col B and Col C then press Ctrl + H > in the find box press the spacebar once then select replace all.

    This will remove all the rouge spaces which will make the cells blank. Then run the code from Debra site

    VBA Noob

  7. #7
    Registered User
    Join Date
    01-28-2008
    Posts
    7
    Thanks for answering, but I am afraid it didn't work. When I ran the p rogram it replace all the cells with the first word in the column, not with the nearest above, which is what I wanted
    Thanks
    Jan

  8. #8
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    I did it the manual way. Select Col B first follow instructions from link then repeated for col C

    To keep the values copy Col B & C and paste special > Values

    VBA Noob
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    01-28-2008
    Posts
    7
    I feel a bit silly here - all I manage to do using the manual version is to fill all cells with the same, whatever is in the first cell. But what I need is it to be filled with whatever is in the cell above.
    I see I can do this lots of times and thereby fill all the cells, but this is what I wanted to avoid.
    It may be I'm doing something wrong, as the link says choose Edit-Go to, but you don't have exact the same in Excel 2007. As you understand I am a complete newbie...
    Jan

  10. #10
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Select Col C then press Alt + F8 and select FillColBlanks

    VBA Noob
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    01-28-2008
    Posts
    7
    I did exactly that and all the cells in the column are filled with the word in cell C1.

  12. #12
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Must be a version thing then. As you can see it worked for me in Col B

    VBA Noob

  13. #13
    Registered User
    Join Date
    01-28-2008
    Posts
    7
    Yes, you're right. It did not work in Excel 2007, but when I saved the files as Ex 2000 and ran the program, it worked fine. Thanks again
    Jan

+ 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