+ Reply to Thread
Results 1 to 2 of 2

Thread: populating blank cells with previous valid value

  1. #1
    Registered User
    Join Date
    03-15-2011
    Location
    Durban, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    1

    populating blank cells with previous valid value

    Hi...pls forgive me if I seem green, but this is a first

    I have a column containing data that I want to duplicate in another column, except instead of transfering blank cells, I want to populate it with the previous valid value eg if A3 is blank, and A2 is blank, then I want B3 to be populated with the value in A1


  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Cochrane,Alberta
    MS-Off Ver
    XL 2003,2007,2010
    Posts
    6,843

    Re: populating blank cells with previous valid value

    Hi redHead,
    It may be easier to just fill in the blank cells in Column A
    Try this,
    Sub FillBlanks()
        
        Columns("A:A").SpecialCells(xlCellTypeBlanks) = "=R[-1]C"
    End Sub
    Or you could copy the column to a new location, then run the code for the new column

+ 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.2.0