Results 1 to 3 of 3

Filling empty cells

Threaded View

  1. #1
    Registered User
    Join Date
    02-04-2011
    Location
    Olkusz
    MS-Off Ver
    Excel 2007
    Posts
    43

    Filling empty cells

    Hello!

    I had to add a little code to another macro to make it fill empty cells with a specified number (973).

    I found almost ready code and modified it to fit my needs.

    Currently it looks like that:
    Sub puste()
    
      Dim Area As Range, LastRow As Long
      On Error Resume Next
      LastRow = Cells.Find(What:="*", SearchOrder:=xlRows, _
                   SearchDirection:=xlPrevious, _
                   LookIn:=xlFormulas).Row
      For Each Area In ActiveCell.EntireColumn(1).Resize(LastRow). _
                   SpecialCells(xlCellTypeBlanks).Areas
        Area.Value = "973"
      Next
    End Sub
    I have 2 questions:
    1. Is there an easier way to do it? Maybe a lot faster one.
    2. What do I have to change to make it work on column A instead of current selection?

    Thanks for all the tips!
    Last edited by bukimiak; 03-17-2011 at 08:15 AM.

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