+ Reply to Thread
Results 1 to 5 of 5

Macro Looping help???

  1. #1
    Registered User
    Join Date
    01-25-2013
    Location
    New York City, New York
    MS-Off Ver
    Excel 2012
    Posts
    2

    Macro Looping help???

    Not sure if the title is correct, but here is my problem.

    I have 2 excel sheets, and in the first (sheet 1) are thousands of named cells in columns B,C,D,E. Also in this sheet there are breaks for different categories. So lets say after 20 rows there is a blank row and a new category of named cells under.

    In the other sheet (sheet 2) I have blank spaces for theses named cells from sheet 1. I have tried writing a macro to pull the named cells from the 1st sheet to the other but I am too much of a rookie at this. In sheet 2 I need to pull the amounts into columns C,E,G,I.

    Any help would be much appreciated!
    Last edited by pcm68827; 04-30-2013 at 01:45 PM.

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Macro Looping help???

    Hello pcm and welcome to the forum.

    Upload a sample workbook having these two sheet and do mention your expected results.. thanks.

    Regards,
    DILIPandey
    <click on below * if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    01-25-2013
    Location
    New York City, New York
    MS-Off Ver
    Excel 2012
    Posts
    2

    Re: Macro Looping help???

    Attached is a sample. So on sheet 1 I have named all the cells that have numbers in them for the "paper" category and then the same would be for the "plastic" category, but I am trying to save time so I stopped.

    So what I want is to so have a macro that will be able to pull all the cells from sheet one to sheet 2 where I made the X's. A simple macro to just pull all the cells in one row would be fine, and I can just edit it to get the other columns.

    The original file is thousands of items so it would take a very long time to just keep doing ="named cell[workbookX.....]".

    Thanks!
    Attached Files Attached Files

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Macro Looping help???

    Okay.. so do you need b3:b8 from sheet 1 to be copied into b3:b8 of sheet2 ?


    Regards,
    DILIPandey
    <click on below * if this helps>

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Macro Looping help???

    Do you want the numbers in sheet1 to be added to the existing values in sheet2?

    Also are sheet1 and sheet2 actually in one workbook or 2 separate files?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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