Results 1 to 3 of 3

Thread: Macro to pull data ranges and comapre them

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #2
    Moderator
    Join Date
    Jul 2012
    Posts
    156
    Rep Power
    14
    Some remarks.
    Code:
    lrow = ActiveSheet.Range("a1").End(xlUp).Row
    lRow always result in 1 since A1 is top row.
    Code:
    Set AllCells = Range("A1:A" & lrow)
    AllCells always result in 1 cell value being A1 value.
    Autofilter will therefore filter on 1 value only and the For...Next loop has no added value.
    Avoid using Select and Selection in code because this is really unnecessary. Instead use With...End With statement.
    Last edited by bakerman; 03-26-2014 at 10:25 AM.

Similar Threads

  1. Replies: 11
    Last Post: 10-13-2013, 10:53 PM
  2. Replies: 2
    Last Post: 09-30-2013, 03:40 PM
  3. Replies: 2
    Last Post: 04-26-2013, 04:59 PM
  4. IE Automated Login/Table Pull
    By mrmmickle1 in forum Hire A Developer
    Replies: 7
    Last Post: 04-04-2013, 04:58 PM
  5. Replies: 3
    Last Post: 05-14-2012, 11:30 AM

Posting Permissions

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