+ Reply to Thread
Results 1 to 8 of 8

VBA Loop Code Help

  1. #1
    Registered User
    Join Date
    05-09-2013
    Location
    Woking, England
    MS-Off Ver
    Excel 2007
    Posts
    16

    VBA Loop Code Help

    Hi,

    I need a simple bit of VBA Code that can help me loop through a large table quickly.

    I have a large table with loads of data what i want it to do is basically apply a filter on Column B for any row that contains a certain name (note this name is not the only aspect of the field it is formatted "Day Time / Person") then for all these values select only columns B,C, and CH and then spit to output into another sheet in the workbook.

    I've got something but it really isn't elegant ... and am guessing this can be done with a simple loop function.

    Any Help???

    Cheers,

  2. #2
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: VBA Loop Code Help

    Can i suggest you upload a workbook with example data? that way you are likely to get some help.
    otherwise what ever is suggested is likley to be wrong!
    Regards
    Sean

    Please add to my reputation if you think i helped
    (click on the star below the post)
    Mark threads as "Solved" if you have your answer
    (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code:
    [code] Your code here [code]
    Please supply a workbook containing example Data:
    It makes its easier to answer your problem & saves time!

  3. #3
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: VBA Loop Code Help

    Maybe:

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    05-09-2013
    Location
    Woking, England
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: VBA Loop Code Help

    Workbook attached
    Attached Files Attached Files

  5. #5
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: VBA Loop Code Help

    How would you like the data copied over into the other sheet? as you have it or the data to be added onto the bottom of the existing data?
    im off out now, but will take a look later today.

  6. #6
    Registered User
    Join Date
    05-09-2013
    Location
    Woking, England
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: VBA Loop Code Help

    Hi,

    Copied into the process data sheet column A - C for Bullied, D - F for Maunsell, G - I for Stroudley, and J - L for Wainwright as these populate graphs

    cheers

  7. #7
    Valued Forum Contributor Sean Thomas's Avatar
    Join Date
    03-25-2012
    Location
    HerneBay, Kent, UK
    MS-Off Ver
    Excel 2007,2016
    Posts
    971

    Re: VBA Loop Code Help

    Hi, this should do what you want.
    You might want to add your clear contents bit at the start of the procedure.
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    05-09-2013
    Location
    Woking, England
    MS-Off Ver
    Excel 2007
    Posts
    16

    Re: VBA Loop Code Help

    This is excellent Thanks!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1