Results 1 to 3 of 3
  1. #1
    5 Star Lounger
    Join Date
    Jan 2001
    Posts
    1,119
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I am highlighting columns and I go to blanks, type in a 0 and do control enter to populate the blanks with 0. There is 58,856 rows and I am getting selection too large. I have been doing this for some time and never received that error. Is there a macro or something that I can use to populate blanks with 0 in highlighted columns?

    It is just some columns that give me selection is too large. Other columns are fine. What would make some columns give me that error and others are OK?

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts
    I think it has to do with the number of non-contiguous ranges that can be worked with. I suspect you have a lot of blanks that are not grouped together in those problematic columns.

    Steve

  3. #3
    5 Star Lounger
    Join Date
    Aug 2004
    Location
    Connecticut, USA
    Posts
    816
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I use the following to replace blank cells with 0s

    Code:
    Sub ReplaceBlanks()
    Dim cCell As Range
    For Each cCell In Selection
    	  If cCell = "" Then cCell = 0
    Next
    
    End Sub

Posting Permissions

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