+ Reply to Thread
Results 1 to 12 of 12

Select next cell option

  1. #1
    Registered User
    Join Date
    11-14-2011
    Location
    Dusseldorf, Germany
    MS-Off Ver
    Excel 2003
    Posts
    97

    Select next cell option

    Hello Guys,

    Need a small help, I have this macro (see attached)
    That runs and opens some files and copy 20 rows of each of this files to second tab of the file.

    The problem is that in some files I don't have 20 rows... but I always want to start pasting from 1, 21, 41, 61 etc...

    The function in the code locates the last non empty row... so the above is not working and I can't make it take the value from column G "Copy to Location(Start Cell Only)"

    Can you please help

    this code should adjusted

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by yiannis1925; 09-16-2012 at 03:05 PM.

  2. #2
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Select next cell option

    maybe the addresses on columns D E G are wrong, it's difficult to check without seeing the csv files
    If solved remember to mark Thread as solved

  3. #3
    Registered User
    Join Date
    11-14-2011
    Location
    Dusseldorf, Germany
    MS-Off Ver
    Excel 2003
    Posts
    97

    Re: Select next cell option

    there is nothing special in tha files... just a range of cells... from A till F and some 10 to 50 rows...
    but I need to copy only 20 of them... as mentioned above

  4. #4
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Select next cell option

    Try this,

    Please Login or Register  to view this content.
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  5. #5
    Registered User
    Join Date
    11-14-2011
    Location
    Dusseldorf, Germany
    MS-Off Ver
    Excel 2003
    Posts
    97

    Re: Select next cell option

    Hello JapanDave,

    Thank you for your reply...

    I tried your code, it opens the files, short them correctly copy that data... but it always copies to A1 cell... All files are copied to A1 cell for some reason... and not A1, A21, A41, etc

    Thank you

  6. #6
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Select next cell option

    My bad,
    I did not correctly copy the code for you. Try this.

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    11-14-2011
    Location
    Dusseldorf, Germany
    MS-Off Ver
    Excel 2003
    Posts
    97

    Re: Select next cell option

    Once again a big thank you... but still the same thing happens... that was the original problem everything is copied to the A1 cell

  8. #8
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Select next cell option

    it's difficult to resolve without seeing the csv files

  9. #9
    Registered User
    Join Date
    11-14-2011
    Location
    Dusseldorf, Germany
    MS-Off Ver
    Excel 2003
    Posts
    97

    Re: Select next cell option

    Hello Patel45,

    Thank you for your reply... as I already replied... there is nothing special in that files...
    You can just create them... some from A till F and some 10 to 50 rows...
    but I need to copy only 20 of them... as mentioned above

  10. #10
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Select next cell option

    as you can see, for now two users are not able to resolve, do what you like

  11. #11
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: Select next cell option

    Ahh, I am so stupid.

    This will work.

    Please Login or Register  to view this content.

  12. #12
    Registered User
    Join Date
    11-14-2011
    Location
    Dusseldorf, Germany
    MS-Off Ver
    Excel 2003
    Posts
    97

    Re: Select next cell option

    That is great!
    Thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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