+ Reply to Thread
Results 1 to 4 of 4

VB Code to Copy & Paste based on Excel Column Value?

  1. #1
    Registered User
    Join Date
    04-12-2012
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    4

    VB Code to Copy & Paste based on Excel Column Value?

    Hello,
    I am needing help with creating a macro to sort a document downloaded from PeopleSoft each morning (read only), and placed into an excel template document based on a column's value. I have attached an example excel document ("MacroHelp.xlsm") with data I am needing to extract.

    As you can see in column E ("Method"), there will be either 'ACH' or CHK'.

    If column E shows 'ACH', I would like to copy all of the data (Column A through Column G) and place it into a different document already created (see attachment 'T&E - ACH Template.xls').

    If column E shows 'CHK', I would like to copy all of the data (Column A through Column G) and place it into a different document already created (see attachment 'T&E - Check Template.xls').

    These templates are reused everday. Meaning, once these templates are filled in correctly with their data, I print and close without saving.

    Thanks in advance for any help you can offer!
    Attached Files Attached Files

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: VB Code to Copy & Paste based on Excel Column Value?

    Heres an example. All 3 workboks must be in the same folder. Download and put all three workbooks into the same folder.

    MacroHelp v1.xlsm
    Last edited by mike7952; 10-10-2012 at 02:38 PM.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

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

    Re: VB Code to Copy & Paste based on Excel Column Value?

    Hi MissMeliss,

    You may have to tweak the Source Book Name:

    Please Login or Register  to view this content.
    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

  4. #4
    Registered User
    Join Date
    04-12-2012
    Location
    Wisconsin
    MS-Off Ver
    Excel 2007
    Posts
    4

    Re: VB Code to Copy & Paste based on Excel Column Value?

    Mike,
    That worked beautifully - many thanks!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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