Results 1 to 2 of 2

Thread: Add new row when filter is applied

  1. #1
    Join Date
    May 2009
    Posts
    45

    Add new row when filter is applied

    I have already created a file and filter some of the columns of it.Over here i want that i can copy some of the cell in the filter column and paste it at the end where there is a blank space.If i try to do so i am getting a message as ArrayIndexOutOfBoundsException : 182. Can anyone tell me what steps i need to follow for the same.

  2. #2
    Join Date
    Apr 2008
    Posts
    2,139

    Re: Add new row when filter is applied

    Try to run the following macro and you would be able to add new row.

    Code:
    Sub Macro1()
       With ThisWorkbook.Sheets("sheet1")
          firstFreeRow = .Range("b1").CurrentRegion.Rows.Count + 1
       
          areasCount = .Range("c2:c" & firstFreeRow - 1).SpecialCells(xlCellTypeVisible). _
                       Areas.Count
       
          bAddress = Split(.Range("c2:c" & firstFreeRow - 1).SpecialCells(xlCellTypeVisible) _
                     .Areas(areasCount).Address(False, False), ":")
    
       End With
    End Sub

Similar Threads

  1. The ROM of the Htc one S can be applied on the Htc one xl?
    By Rozamond in forum Portable Devices
    Replies: 3
    Last Post: 20-04-2012, 03:22 PM
  2. How to setup IP Filter & MAC filter on Huawei MT841?
    By Eas!war in forum Networking & Security
    Replies: 1
    Last Post: 04-03-2012, 04:06 PM
  3. The visual styles could not be applied
    By LOCHAN in forum Customize Desktop
    Replies: 3
    Last Post: 10-11-2009, 06:56 PM
  4. Picollator filter : Automatic adult content filter
    By monsitj in forum Windows Software
    Replies: 1
    Last Post: 29-01-2009, 07:07 PM
  5. Group Policy sometimes not being applied.
    By Cris Han in forum Active Directory
    Replies: 2
    Last Post: 13-01-2008, 10:47 AM

Tags for this Thread

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
  •  
Page generated in 1,711,727,880.60542 seconds with 17 queries