Consulting

Page 3 of 3 FirstFirst 1 2 3
Results 41 to 44 of 44

Thread: Copying & pasting with a For...Next Loop

  1. #41
    MD, Norie, XL, I want to kiss you all!! (Entirely platonic you understand?)

    Just back from travels and ran MD's code. It seems to be doing the job. I shall put it through it's paces tomorrow with a full 26,000 line list then come back with feedback.

    Wow, thanks guys. I never thought I'd get this one sorted. How foolish of me with a forum so damn fine as this!!

  2. #42
    VBAX Master Norie's Avatar
    Joined
    Jan 2005
    Location
    Stirling, Scotland
    Posts
    1,831
    Location
    So which code is working?

    Is it MD's revision of mine?

  3. #43
    Administrator
    VP-Knowledge Base
    VBAX Grand Master mdmackillop's Avatar
    Joined
    May 2004
    Location
    Scotland
    Posts
    14,489
    Location
    Hi Norie,
    Your use of filtering made the difference, I assumed the Depot numbers could be hard coded which simplified getting depot names and I tweaked your code to add the sheet names accordingly
    Regards
    MD
    MVP (Excel 2008-2010)

    Post a workbook with sample data and layout if you want a quicker solution.


    To help indent your macros try Smart Indent

    Please remember to mark threads 'Solved'

  4. #44
    VBAX Master Norie's Avatar
    Joined
    Jan 2005
    Location
    Stirling, Scotland
    Posts
    1,831
    Location
    MD

    The reason I didn't hard code the criteria was because I was thinking what would happen if a new depot was added, or one deleted/changed.

    I don't know if that issue was dealt with in previous posts - I'll take a look.

Posting Permissions

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