+ Reply to Thread
Results 1 to 4 of 4

Copy and Paste VBA

  1. #1
    Forum Contributor
    Join Date
    05-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    184

    Copy and Paste VBA

    If the current Workbook is named "Alex Yoong 120399", how can I pull out just "Alex Yoon" and paste it to the Destination:=Workbook(Data).Worksheets(Sheet1).Range("A1").


    Something like this:

    ActiveCell.Offset (-1,1).Copy Destination:=Workbooks(Data).Worksheets("Sheet1").Range("A1")

    Thank you for your help.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,668

    Re: Copy and Paste VBA

    This worked for me.

    Please Login or Register  to view this content.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Forum Contributor
    Join Date
    05-04-2013
    Location
    USA
    MS-Off Ver
    Excel 365
    Posts
    184

    Re: Copy and Paste VBA

    looks good, but unfortunately that macro is not dynamic. I am looking for something more dynamic where a name can be "Alex Hu Mai 1843". I this case, I just want only Alex Hu. I believe your macro will pull "Alex Hu Mai"

  4. #4
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 insider Version 2504 Win 11
    Posts
    24,668

    Re: Copy and Paste VBA

    You have provided two different criteria. In simple business terms, how would you describe the conditions under which the name is extracted. For VBA to fully automated (dynamic in your terms) it must have definitive criteria, ie. some form of standardization.

+ 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. Replies: 3
    Last Post: 01-01-2015, 06:26 AM
  2. How do I make the copy/paste of one column contingent on the copy/paste of another?
    By Kwasimitsu in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-23-2014, 01:51 PM
  3. Automate copy and paste and copy and paste back to excel
    By Bmw318be in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-23-2013, 05:42 AM
  4. Automate copy and paste and copy and paste back to excel
    By Bmw318be in forum Access Tables & Databases
    Replies: 0
    Last Post: 02-23-2013, 05:42 AM
  5. Replies: 1
    Last Post: 01-16-2013, 05:36 AM
  6. 2 Macro's: only vertical copy/paste action and copy-paste 14 columns to the right.
    By vdongen in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-08-2010, 10:34 AM
  7. Replies: 1
    Last Post: 01-04-2005, 06:06 PM

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