+ Reply to Thread
Results 1 to 3 of 3

Macro VBA find last instance of a word

  1. #1
    Registered User
    Join Date
    09-16-2009
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    2

    Macro VBA find last instance of a word

    Hi

    I have a spreadsheet which I am trying to put in a macro to add a new page (below the current page in the same worksheet) so that users who are unfamilair with Excel can simply do this. I have got the macro to copy the cells I want and can get it to paste but the issue is I don't always want it to paste in the same place. The current document is 1 page long but it may need to be up to 10 pages long. I am trying to get it to find the last instance of the word "COMMENTS" and then paste the copied info 3 rows below that.

    I am a complete novice at VBA but have come up with the following code so far:
    Please Login or Register  to view this content.
    Although I know this is not right and needs more in it. I can't figure out how to tell it to find the last COMMENTS and how to paste 3 rows down from that.

    Any help appreciated - thanks!!
    Last edited by Leith Ross; 09-16-2009 at 05:18 PM. Reason: Added Code Tags

  2. #2
    Registered User
    Join Date
    09-16-2009
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2003
    Posts
    2

    Re: Macro VBA find last instance of a word

    someone else helped me with this on another forum so no need to reply

  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: Macro VBA find last instance of a word

    Hello lindylou2,

    Welcome to the Forum!

    It would nice if you shared the solution with your fellow members or at least provided a link to the site where it was solved.
    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!)

+ 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