+ Reply to Thread
Results 1 to 11 of 11

How to stop .End(xlip).Offset(0, 0) at a certain point?

  1. #1
    Forum Contributor
    Join Date
    09-20-2012
    Location
    Norge
    MS-Off Ver
    Excel 2007
    Posts
    114

    How to stop .End(xlip).Offset(0, 0) at a certain point?

    Hello,

    I was wondering how I can stop the following macro button, which Works good, to not og any further that to C13. C13 should be the last whereby the code should work. C12 contains heading of table.

    Please Login or Register  to view this content.
    If it is any help, the content of the cell C12 is "Manufacturer".

    Thanks in advance

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to stop .End(xlip).Offset(0, 0) at a certain point?

    Maybe:

    Please Login or Register  to view this content.
    Last edited by xladept; 09-03-2013 at 03:58 PM.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

  3. #3
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: How to stop .End(xlip).Offset(0, 0) at a certain point?

    Hello tnuis,

    Here is one way to do it...
    Please Login or Register  to view this content.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  4. #4
    Forum Contributor
    Join Date
    09-20-2012
    Location
    Norge
    MS-Off Ver
    Excel 2007
    Posts
    114

    Re: How to stop .End(xlip).Offset(0, 0) at a certain point?

    Quote Originally Posted by Leith Ross View Post
    Hello tnuis,

    Here is one way to do it...
    Please Login or Register  to view this content.
    Hmmmm. This one doesnīt work. Nothing happens at all when the macro has this code. Must be something missing here??

  5. #5
    Forum Contributor
    Join Date
    09-20-2012
    Location
    Norge
    MS-Off Ver
    Excel 2007
    Posts
    114

    Re: How to stop .End(xlip).Offset(0, 0) at a certain point?

    Quote Originally Posted by xladept View Post
    Maybe:

    Please Login or Register  to view this content.

    Iīm afraid this one doesnīt work either. Nothing happens when the macro contains only this code. My code does work only it never stops.....

  6. #6
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to stop .End(xlip).Offset(0, 0) at a certain point?

    Hey tnuis,

    It works for me?

  7. #7
    Forum Contributor
    Join Date
    09-20-2012
    Location
    Norge
    MS-Off Ver
    Excel 2007
    Posts
    114

    Re: How to stop .End(xlip).Offset(0, 0) at a certain point?

    Quote Originally Posted by xladept View Post
    Hey tnuis,

    It works for me?

    Really strange. Here is the Sample workbook. You can choose something from the ComboBox1 and then press the "RESET LAST ROW" button. Now it is running Your code. I just copypasted it strait from Your comment.

    Sample Workbook.xlsm

    Can you see what Iīm doing wrong?


    By the way, I found another solutin that actually does the trick, but itīnot the nicest solution I think but the following code does work (Leverandør = Manufacturer):

    Please Login or Register  to view this content.

  8. #8
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to stop .End(xlip).Offset(0, 0) at a certain point?

    The code works when you have data in Range("AE1:AN1")???

  9. #9
    Forum Contributor
    Join Date
    09-20-2012
    Location
    Norge
    MS-Off Ver
    Excel 2007
    Posts
    114

    Re: How to stop .End(xlip).Offset(0, 0) at a certain point?

    Quote Originally Posted by xladept View Post
    The code works when you have data in Range("AE1:AN1")???
    Oh no, I think I havenīt been clear enough. I want the opposite of what your code does. If there is data in the AE1:AN1 then it fills inn THAT data in the first empty ROW in the destination with your code. I entered "bla bla bla" in the cells AE1:AN1 now and whenever the Macro button is hit it fills in bla bla boa in the first empty cell it finds , counting from C41 and up.


    What I want is the opposite. I want it to start at C41 and start searching upwards for the first cell that contains a value, and THEN delete that, hence the AE1:AN1 is empty.

    My original code in this thread DOES this, BUT my problem is that it will never stop so my whole order template is ruined if button is hit when C13 is empty, coz then it copy pastes the AE1:AN1 into the headers which is C12:L12.

    I simply want the code to stop function after C13.

    Might I also add that AE1:AN1 contains some formulas that need to be transferred as well. Thatīs why I use the code that I use.


    Hope this was clearer

  10. #10
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to stop .End(xlip).Offset(0, 0) at a certain point?

    Please Login or Register  to view this content.

  11. #11
    Forum Contributor
    Join Date
    09-20-2012
    Location
    Norge
    MS-Off Ver
    Excel 2007
    Posts
    114

    Re: How to stop .End(xlip).Offset(0, 0) at a certain point?

    Quote Originally Posted by xladept View Post
    Please Login or Register  to view this content.
    Aaaaaaahhhhhh. Thatīs the one Everything is working perfect now. Thanks a lot man!!

  12. #12
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: How to stop .End(xlip).Offset(0, 0) at a certain point?

    You're welcome!

+ 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. [SOLVED] Create custom command to stop code at any point
    By sczerniak in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-15-2013, 03:12 PM
  2. make excel RTD stop at a certain point? (please take a look)
    By ryefield in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-20-2013, 09:46 AM
  3. What is the stop point for For Each Function using columns?
    By smohyee in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-16-2011, 02:36 AM
  4. [SOLVED] how do I stop excel putting a space after a decimal point
    By Billious in forum Excel General
    Replies: 1
    Last Post: 02-16-2006, 04:25 AM
  5. Copying numbers down to a stop point
    By toesparkle in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-21-2005, 08:52 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