+ Reply to Thread
Results 1 to 3 of 3

VBA Code to copy values from two columns of a WS to two columns of another WS

  1. #1
    Registered User
    Join Date
    06-22-2018
    Location
    England
    MS-Off Ver
    2013
    Posts
    15

    VBA Code to copy values from two columns of a WS to two columns of another WS

    Hi,

    I am after a vba code that will copy any rows in sheet1 in range A10 to A30 and range X10 to X30 that have data in them and ignore blank cells in those ranges and copy them to the next available row down in sheet2 in columns C and E. I only want it to copy the values not any formats etc.

    Is this possible please?

    Any help that could be given would be very much appreciated.

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: VBA Code to copy values from two columns of a WS to two columns of another WS

    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    Please Login or Register  to view this content.
    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    06-22-2018
    Location
    England
    MS-Off Ver
    2013
    Posts
    15

    Re: VBA Code to copy values from two columns of a WS to two columns of another WS

    Quote Originally Posted by :) Sixthsense :) View Post
    How to install your new code
    1. Copy the Excel VBA code
    2. Select the workbook in which you want to store the Excel VBA code
    3. Press Alt+F11 to open the Visual Basic Editor
    4. Choose Insert > Module
    5. Edit > Paste the macro into the module that appeared
    6. Close the VBEditor
    7. Save your workbook (Excel 2007+ select a macro-enabled file format, like *.xlsm)

    Please Login or Register  to view this content.
    To run the Excel VBA code:
    1. Press Alt-F8 to open the macro list
    2. Select a macro in the list
    3. Click the Run button
    That works perfect thank you so much!!!

    I wish i knew how to read and write all that like you guys do!

    Very much appreciated thanks for the help!.

+ 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. Need vba code to create pivottable & copy to new sheet with added columns and values
    By julielara in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-05-2016, 05:06 AM
  2. copy values from columns to rows while skipping empty columns...
    By EricCy in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-10-2016, 06:20 AM
  3. Code to search for matching values in two columns, take text from that row and copy
    By Excelsemi in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-23-2014, 12:12 PM
  4. [SOLVED] Copy/Paste multiple columns as values based on another columns criteria
    By Dgp2012 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 07-28-2013, 06:50 AM
  5. Compare 2 columns and copy new values from the 2nd columns to a 3rd column
    By djarcadian in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-02-2013, 12:18 PM
  6. [SOLVED] Code for Copy and Paste Special- Values in Columns
    By gautamacharya in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-23-2012, 04:51 PM
  7. Copy columns values into separate columns
    By Mike_can in forum Excel General
    Replies: 7
    Last Post: 05-26-2006, 07:35 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