+ Reply to Thread
Results 1 to 6 of 6

Both End(xlDown)and End(xlUp) are doing the same! is this logic?

  1. #1
    Registered User
    Join Date
    05-30-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    68

    Both End(xlDown)and End(xlUp) are doing the same! is this logic?

    I am using code below to copy all cells with values in a column and copy it in another column in another page. I tested the code with End(xlDown) and End(xlUp) and both are working!. can anyone explain what is the difference. and which one is the right one to use.

    Note: I got this code with help of some good fellows in this forum so I don't really understand how it is explained.


    Please Login or Register  to view this content.
    /E

  2. #2
    Registered User
    Join Date
    08-27-2013
    Location
    Texas
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Both End(xlDown)and End(xlUp) are doing the same! is this logic?

    Spaces...
    The End(xldown) is like doing a Ctrl+down Arrow.
    If there is a space the down will stop at the space.

    the xlup is doing ctrl+up arrow until it hits top or space.

    Both will work if you are sure there are no blank spaces in the column

    I generally like to start at bottom of sheet 1000000+ rows and ctrl+up = End(xlup)

  3. #3
    Forum Expert nilem's Avatar
    Join Date
    10-22-2011
    Location
    Ufa, Russia
    MS-Off Ver
    2013
    Posts
    3,377

    Re: Both End(xlDown)and End(xlUp) are doing the same! is this logic?

    Hi Emma_B,
    try
    Please Login or Register  to view this content.
    Last edited by nilem; 10-18-2014 at 10:08 AM.

  4. #4
    Registered User
    Join Date
    05-30-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: Both End(xlDown)and End(xlUp) are doing the same! is this logic?

    not really, it does not stop when there is blank cells, it copy all the cells with values in the column. look in the attached sample.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    05-30-2013
    Location
    Sweden
    MS-Off Ver
    Excel 2010
    Posts
    68

    Re: Both End(xlDown)and End(xlUp) are doing the same! is this logic?

    Thanks nilem, the (With) method works faster.

    How can I reference to a named cell. "B2" in sheet1 is a header named "Status" and "D1" in Sheets2 is named "Updated_Status". how can I reference to these named cells with offset code.

    /E

  6. #6
    Forum Contributor
    Join Date
    08-29-2012
    Location
    Hyderbad
    MS-Off Ver
    Excel 2003
    Posts
    123

    Re: Both End(xlDown)and End(xlUp) are doing the same! is this logic?

    Hi Emma,

    Please have a look from the below link: Brief notes.

    VBA codes to determine Last Used Row & Last Used Column in Excel
    http://www.globaliconnect.com/excel/...=79&Itemid=475

+ 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. End(xlUp)
    By m4nd4li4 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 11-17-2014, 09:33 PM
  2. VBA-End(xlDown) and End(xlUp) problem
    By garyyy3 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-18-2014, 06:10 AM
  3. xlup/xldown formula implementation
    By rasosina in forum Excel General
    Replies: 3
    Last Post: 08-26-2011, 02:57 PM
  4. troubleshoot xlUp xlDown error 1004
    By LowSociety in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-13-2010, 11:48 AM
  5. End(xlUp)
    By chedges in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-13-2009, 11:31 AM

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