+ Reply to Thread
Results 1 to 2 of 2

Macro that uses a cell reference in a cell to activate that cell and copy it to the cell

  1. #1
    Registered User
    Join Date
    03-24-2013
    Location
    Apple Valley, MN
    MS-Off Ver
    Excel 2010
    Posts
    29

    Macro that uses a cell reference in a cell to activate that cell and copy it to the cell

    I have a seating chart with the names and pictures filled in. Below that I have a second chart with the names re-arranged in
    Columns D,G,J,M,Q,T,W & Z. The cells to the left of these columns have a formula that looks at the cells in the columns on the right, matches them to the seating chart above and gives the cell reference that contains the picture that goes with the name. So what I need is a macro that will start in C12 see that it is blank and move on to C13, see that C13 contains the cell reference $L$9, activate $L$9, copy it and paste it back into C13. So the macro will need to loop through the ranges C12:C20, F12:F20, I12:I20, L12:L20, P12:P20, S12:S20, V12:V20, Y12:Y20
    I have uploaded a sample file but it contains Chinese characters.
    SeatingChartSample.xlsm
    Thanks!

  2. #2
    Registered User
    Join Date
    03-24-2013
    Location
    Apple Valley, MN
    MS-Off Ver
    Excel 2010
    Posts
    29

    Re: Macro that uses a cell reference in a cell to activate that cell and copy it to the ce

    I found some of the answer but I still need help.
    The following code works just right
    Please Login or Register  to view this content.
    but when I adjust it so it will loop through all the ranges I need it to go through like below
    Please Login or Register  to view this content.

    I get this error
    Run-time error '1004':

    Method 'Range' of object'_Global' failed

    I can get it to run anyways by adding "On Error Resume Next" but then it just grabs some pictures and puts them in the blank cells that are supposed to stay blank.
    NOTE: The "blank" cells aren't really blank but have a formula that returns a blank if there is no name in the adjacent cell to match.

    Any ideas? I have uploaded the file again since I found the pictures were too big for the cells and overlapped a bit causing the macro to grab two pictures instead of just the one in the target cell. SeatingChartSample.xlsm
    Last edited by bkwins; 11-06-2013 at 03:00 AM.

+ 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: 10-29-2013, 12:06 AM
  2. [SOLVED] How to copy a formula to a new cell and jump the cell reference more than one cell
    By sarkman22 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-22-2013, 08:00 AM
  3. Use VBA to copy Data Validation reference cell font color to destination cell?
    By proav in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-07-2012, 08:09 PM
  4. Copy cell, find value in another spreadsheet, activate cell.
    By Hjahren in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-23-2010, 05:11 AM
  5. Copy/move cell format & comment in cell reference
    By mkseto in forum Excel General
    Replies: 3
    Last Post: 02-02-2009, 03:00 AM

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