+ Reply to Thread
Results 1 to 5 of 5

Can a Macro extract cell references from a Column and paste them into a Row.

  1. #1
    Registered User
    Join Date
    05-15-2014
    MS-Off Ver
    Excel 2003
    Posts
    4

    Can a Macro extract cell references from a Column and paste them into a Row.

    Please see the attached (simplified!) example.

    Hundreds of Reports are filed Vertically on a worksheet.

    However, I need to do a summary table on a different worksheet.

    The idea is that whenever a new report is created (in the correct place under all the others) the summary table will automatically be up-dated with data from the new report.

    What I would like to do is write an Excel Macro that fill in all the Cell References in the Summary Table. (Because the data is copied from a spaced out column to a compact row I don't think I can achieve this by Copying & Pasting).

    Thank you for any offers of help; if you just help me get started I will do all the donkey work myself!
    Attached Files Attached Files
    Last edited by Waste Timer; 09-10-2016 at 01:57 PM. Reason: typo

  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: Can a Macro extract cell references from a Column and paste them into a Row.

    Hi,

    You may find the attached approach which uses a Pivot Table more useful.Itg avoids the use of functions or macros apart from one macro that automatically refreshes the Pivot Table when you select the sheet.

    You just need to make sure that on the Reports sheet the formulae in the helper columns D:G are copied down. Columns E:G are the data source for the Pivot Table and there's a dynamic range name "Data" that automatically adjusts as you copy the formulae down which is used as the source for the PT.
    Attached Files Attached Files
    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
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Can a Macro extract cell references from a Column and paste them into a Row.

    This is possible with formulas also :
    On A3 of Summary write this :
    Please Login or Register  to view this content.
    Now copy down.

    On B3 of Sammary write this :
    Please Login or Register  to view this content.
    Now copy right and down. That's it.

    See the attachment.
    Attached Files Attached Files

  4. #4
    Forum Expert JLGWhiz's Avatar
    Join Date
    02-20-2011
    Location
    Florida, USA
    MS-Off Ver
    Windows 10, Excel 2013
    Posts
    2,070

    Re: Can a Macro extract cell references from a Column and paste them into a Row.

    this might also work for you
    Please Login or Register  to view this content.

  5. #5
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,527

    Re: Can a Macro extract cell references from a Column and paste them into a Row.

    Or something like this.
    Based on your example with the "Merge and Center" cells
    It deletes the "Summary" sheet if it is there and makes a new "Summary" sheet to start clean.
    Please Login or Register  to view this content.
    Last edited by jolivanes; 09-11-2016 at 12:11 AM. Reason: Fixed mistake

+ 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. Macro to scan and through column and extract corresponding cell value
    By cching in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 02-04-2016, 08:12 AM
  2. Help to modify the macro to copy and past the cell value
    By Adhavan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-27-2015, 01:05 AM
  3. VBA - Copy/past cell 144 times in column
    By dfanara in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-18-2014, 07:30 AM
  4. [SOLVED] Can't scroll down past row 260, or past column Y in Excel 2003....
    By damianberry in forum Excel General
    Replies: 2
    Last Post: 12-11-2012, 01:00 AM
  5. If cell in same row column A contains anything, past formula in column H same row
    By kldailey in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-09-2012, 01:55 PM
  6. Copy&Past Cell Value from one Column to another using VBA
    By bdb1974 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-29-2009, 01:45 PM
  7. Macro to find dates past due in a column
    By bundyloco in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-04-2006, 05:24 AM

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