+ Reply to Thread
Results 1 to 3 of 3

MACRO TO LOOK through large dataa.

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    04-28-2013
    Location
    Miami, United States
    MS-Off Ver
    Excel 365 (Newest version)
    Posts
    259

    MACRO TO LOOK through large dataa.

    Anyone knows a macro that can look through a large worksheet of data and return in another sheet results for the columns listed below?
    Year
    Month
    Week
    Date
    Name
    Status
    Tenure
    Accuracy
    Production time
    etc.

    I am not sure if there is a macro that can do that but i'm still asking. If anyone knows....all i need is a sample and I can work from that.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: MACRO TO LOOK through large dataa.

    Something like this:

    Sub ShellyBelly(): Dim k As Long, c As Long, ws As Worksheet, wa As Worksheet, H, D As Range, n As Long
        Set wa = ActiveSheet: c = wa.Columns.Find("*", , , , xlByColumns, xlPrevious).Column
                            wa.copy After:=wa: Set ws = ActiveSheet
    H = Array("Year", "Month", "Week", "Date", "Name", "Status", "Tenure", "Accuracy", "Production Time")
                    For k = 1 To c: For n = 0 To UBound(H)
                    If Trim(ws.Cells(1, k)) = H(n) Then GoTo GetNext
                    Next n
                    If D Is Nothing Then
                    Set D = ws.Columns(k)
                    Else
                    Set D = Union(D, ws.Columns(k)): End If
    GetNext:        Next k
                    D.Delete
    End Sub
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: MACRO TO LOOK through large dataa.

    Perhaps just use filters? You can then copy/paste the results where you want
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Macro Help, removing large
    By corman8 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-04-2014, 06:15 PM
  2. Transpose large data set using MACRO
    By xsiededios in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-08-2013, 03:23 AM
  3. Large Form Help: Handling large number of text boxes and labels
    By laterdaysluke in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-01-2010, 03:12 PM
  4. Excel Macro - Procedure Too Large
    By saeed9313 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 10-15-2008, 01:41 PM
  5. “Import External Data:Import External Data
    By Jeff in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-03-2005, 06:06 PM

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