Closed Thread
Results 1 to 1 of 1

Need Help with Macro

Hybrid View

  1. #1
    Registered User
    Join Date
    10-01-2009
    Location
    Santa Maria, CA
    MS-Off Ver
    Excel 2003
    Posts
    30

    Need Help with Macro

    I'm having a problem with the macro below. Your site had helped me write this macro as I have very little experience with VB. Attached is a sample Excel file. The sheet "RF#&MTC#Match" uses the macro below. The data shown is the results of the macro when it worked. Ths sample Excel file has approximately 400 lines of data, our "real file" has over 17,000 lines of data and growing. I would appreciate your help with this again.

    Thanks,
    Andy

    Sub x()
        Dim t           As Range
        Dim cell        As Range
    
        Set t = Worksheets("Data").UsedRange
        With t.Resize(, 1).Offset(, t.Columns.Count)
           .FormulaT1C1 = "=counta(tc12:tc13)*counta(tc15:tc16)"
    
            For Each cell In .Cells
                If cell.Value Then
                    Intersect(cell.EntireRow, t.EntireColumn).Copy _
                            Destination:=Worksheets("RF#MTC#Match").Cells(Rows.Count, "A").End(xlUp).Offset(1)
                End If
            Next cell
    
            .ClearContents
        End With
    End Sub
    Attached Files Attached Files
    Last edited by CaptinKrunch; 02-26-2010 at 03:13 PM. Reason: forgot code format

Closed 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.6.0 RC 1