+ Reply to Thread
Results 1 to 6 of 6

Filling in blank cells

  1. #1
    Registered User
    Join Date
    02-13-2012
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007, 2010, 2003
    Posts
    80

    Filling in blank cells

    Good afternoon, I have a spreadsheet with about 10 years of data. The data dates are in column A, but are not filled in all the way - if 3 samples were collected on 1/2/06, only the first sample has a date. I would like to autofill the blanks with the previous number. I have a macro that I am trying to put together, but seem to have something wrong, could anyone please correct it for me? I don't mind using one for each sheet, I can run it for each sheet individually.

    Please Login or Register  to view this content.
    Thanks!
    Last edited by kevinjay1; 12-17-2012 at 02:50 PM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Filling in blank cells

    Hi kevinjay1

    Suggest you to put your code in CODE TAGs.. see the rules:-

    http://www.excelforum.com/forum-rule...rum-rules.html

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    02-13-2012
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007, 2010, 2003
    Posts
    80

    Re: Filling in blank cells

    Made the change, are there any suggestions though?

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Filling in blank cells

    Your code worked beautifully for me. Can you explain what "something wrong" means?
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  5. #5
    Registered User
    Join Date
    02-13-2012
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007, 2010, 2003
    Posts
    80

    Re: Filling in blank cells

    When I plugged it in, perhaps I put it in wrong, here is what I did

    The way that I did it is probably the problem. I opened up Visual Basic in the Developer tab (2010), double clicked on the sheet that I was going to use it in and pasted the code into that sheet. I then click on the Macro button and get a "Compile error: Sub or function not defined".

    As I said, my application of the application was probably flawed. Am I correct in thinking that I am incorrect?

  6. #6
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,721

    Re: Filling in blank cells

    You code calls a sub called SortData. Where is the code for Sub SortData?

+ 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