+ Reply to Thread
Results 1 to 3 of 3

Iteratively copy cells from one worksheet in a workbook to another worksheet in another wo

  1. #1
    Registered User
    Join Date
    05-21-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    75

    Iteratively copy cells from one worksheet in a workbook to another worksheet in another wo

    Hello Everyone,
    I am new to macros and wanted some help in automating few tasks. Expert guidance is welcomed (Excel 2010 question)

    I have two workbooks "GHTR" and "GHTR_RAW". I want to copy data from different worksheets in GHTR to GHTR_RAW. GHTR has more worksheets than GHTR_RAW but worksheets in GHTR are present in GHTR_RAW. (GHTR worksheets are superset of GHTR_RAW worksheet)

    I want to copy column A and column C from GHTR. The copied cell should start from cell A2 till the time it encounters a blank row and cell C2 till it encounters a blank row to GHTR_RAW cell B49 and downwards and Cell C49 and downwards. Also they should be copied to cell F49 and downwards and cell G49 and downwards

    Basically,
    GHTR:A2 till the time it encounters a blank row --> GHTR_RAW: cell B49 and downwards, cell F49 and downwards
    GHTR:C2 till the time it encounters a blank row --> GHTR_RAW: Cell C49 and downwards, cell G49 and downwards

    This needs to go from GHTR (worksheet abc) to GHTR_RAW (worksheet abc). This way it will iterate over all the worksheet in GHTR copy the data using the above logic and past it to the corresponding GHTR_RAW worksheet. e.g. GHTR: abc goes to GHTR_RAW: abc, GHTR: xyz goes to GHTR_RAW: xyz

    Waiting for your expert replies.

    Thanks,
    Amandeep

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Iteratively copy cells from one worksheet in a workbook to another worksheet in anothe

    Hi,

    Is this something you want to repeat many times, hence the suggestion of a macro? If it's not and a one off exercise then I'd just be inclined to do it manually. Yuo'll no doubt need to filter/copy/pastevalues.

    If however you do need macros to automate it you'll need to upload the workbook so that we can see the request in context.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    05-21-2012
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    75

    Re: Iteratively copy cells from one worksheet in a workbook to another worksheet in anothe

    Hi Richard,
    I will have to do that for a lot. I have attached two excel sheets with what I want. As you can see in GHTR there is data in column A,C even after encountering a first blank row but I want to copy till one row above the first blank row occurrence. Also, it needs to find the same worksheet name in GHTR_RAW and copy it based on the above logic.
    Attached Files Attached Files

+ 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: 2
    Last Post: 11-12-2013, 08:42 PM
  2. [SOLVED] Copy certain cells before save from a worksheet in one workbook to a worksheet in another
    By Marianne Rachmann in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-22-2012, 07:16 PM
  3. copy cells from worksheet that ref a protected workbook
    By realniceguy5000 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-23-2011, 02:06 PM
  4. macro copy worksheet to new workbook and name it with cells value
    By jarssonn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-19-2010, 07:59 AM
  5. Can't copy cells from Worksheet A in Workbook 1 to Worksheet B in Workbook 2
    By exartizo in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-11-2005, 05:52 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