+ Reply to Thread
Results 1 to 12 of 12

Strange xldown result

  1. #1
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Strange xldown result

    Hi all,

    In my code i am using xldown to move to the next cell that is non blank.

    When i run this code:

    Table is A1:D100

    I am looking for the next cell in Column A (After ActiveCell) that is Non Blank.

    A11 = String
    A12 = String
    A13 = String etc
    A22 = String

    When i run this using A11 as Activecell, It finds the next Non Blank/Non Empty Cell as A15 for example.. when it should be A12.

    The Line of Code is:

    Please Login or Register  to view this content.
    Does anyony have any idea why???

    Regards

    JRidge

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,308

    Re: Strange xldown result

    I'd have to assume there is something in A14:A16, even though they appear blank. What happens if you press Ctrl+down arrow with A11 selected?
    Anyone who confuses correlation and causation ends up dead.

  3. #3
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: Strange xldown result

    Does the same,

    I was about to edit my original post with that
    If the solutions provided within this Thread takes care of your question:

    Please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.

    You can also click on * (star) Add Reputation to add reputation to those who have put their time and efforts to help you in this Thread.

    This is another way to say Thank You to them.

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,643

    Re: Strange xldown result

    If you have data in cells A11:A15 then using xlDown from A11 will goto A15, not A12 - try it manually.
    If posting code please use code tags, see here.

  5. #5
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: Strange xldown result

    For some reason it sees the cells A12, A13 and A14 as Blank/Empty even though they have something in..

    And i don't know why??

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,308

    Re: Strange xldown result

    Then there is something in there as far as Excel is concerned. You'll need to clear those cells.

  7. #7
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: Strange xldown result

    How would i find the next cell that is Non Empty then

  8. #8
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: Strange xldown result

    I want it to find A12 as it is the next cell that is not empty

  9. #9
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: Strange xldown result

    I want it to skip any Blank cells and find the next Non Blank...

    So if:

    A11: Active cell
    A12: Blank
    a13: Blank
    A14: String

    It would find A14

    But if

    A11: Active Cell
    A12: String

    It would find A12

  10. #10
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: Strange xldown result

    Can this not be done then?

  11. #11
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    East Sussex, UK
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,308

    Re: Strange xldown result

    Yes it can, but your question seemed to keep changing!
    Please Login or Register  to view this content.

  12. #12
    Forum Contributor
    Join Date
    09-11-2013
    Location
    Germany
    MS-Off Ver
    Excel 2007
    Posts
    265

    Re: Strange xldown result

    Thank You romperstomper.

    Works how i want it now..

    Please Login or Register  to view this content.


    Regards

    JRidge

+ 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. How to make a pie?...strange result!
    By belfagor in forum Excel Charting & Pivots
    Replies: 17
    Last Post: 11-12-2013, 07:46 AM
  2. Strange Vlookup result - baffled
    By andycaps in forum Excel General
    Replies: 9
    Last Post: 01-18-2012, 08:58 AM
  3. Strange MOD() result?
    By rwgrietveld in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-11-2008, 11:02 AM
  4. strange result from SpecialCells
    By seron in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 11-26-2006, 02:53 PM
  5. Strange result in Excel 2000
    By ibertram in forum Excel General
    Replies: 4
    Last Post: 11-12-2005, 09:50 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