Results 1 to 6 of 6

Filling in blank cells

Threaded View

kevinjay1 Filling in blank cells 12-17-2012, 02:23 PM
dilipandey Re: Filling in blank cells 12-17-2012, 02:43 PM
kevinjay1 Re: Filling in blank cells 12-17-2012, 02:50 PM
6StringJazzer Re: Filling in blank cells 12-17-2012, 03:16 PM
kevinjay1 Re: Filling in blank cells 12-17-2012, 03:39 PM
6StringJazzer Re: Filling in blank cells 12-17-2012, 06:33 PM
  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.

    Sub Fill_Blank_Cells()
        Dim LR As Long
        LR = Range("A" & Rows.Count).End(xlUp).Row
        With Range("A2:A" & LR)
            .SpecialCells(xlCellTypeBlanks).FormulaR1C1 = "=R[-1]C"
            .Value = .Value
        End With
        Call SortData
    End Sub
    Thanks!
    Last edited by kevinjay1; 12-17-2012 at 02:50 PM.

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