What's wrong with my code?
What's wrong with my code?
Thanks Thanks:  0
Likes Likes:  0
Results 1 to 2 of 2

Thread: What's wrong with my code?

  1. #1
    New Member
    Join Date
    Apr 2002
    Posts
    3
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    Hi guys,

    Range("B1").Select
    again:
    Selection.Copy
    ActiveCell.Offset(1, 0).Select

    While ActiveCell.Value = Null
    ActiveCell.PasteSpecial xlPasteValues
    ActiveCell.Offset(1, 0).Select
    Wend

    GoTo again

    I'm basically trying to evaluate the cells in a column and do a FillDown on the empty cells. The column may look like the following:

    11111
    blank
    blank
    22234
    blank
    38288
    blank
    blank
    blank

    so on and so on. The blanks would be filled in with the closest number above the blank.

    Any help is appreciated!

  2. #2
    New Member
    Join Date
    Apr 2002
    Posts
    7
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    On Error Resume Next
    With Range("B1:B20").SpecialCells(xlCellTypeBlanks) 'change range as required
    .FormulaR1C1 = "=R[-1]C"
    .Value = .Value
    End With
    On Error GoTo 0


    [ This Message was edited by: fght on 2002-04-09 15:19 ]

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

 

 
DMCA.com