+ Reply to Thread
Results 1 to 4 of 4

Looking for a macro that will follow cell A1 with range of columns B/C/D then loop to A2

  1. #1
    Registered User
    Join Date
    05-09-2013
    Location
    Connecticut, U.S.A.
    MS-Off Ver
    Excel 2010
    Posts
    7

    Question Looking for a macro that will follow cell A1 with range of columns B/C/D then loop to A2

    I need a macro that will take the value from my A column and deliver it followed by values of my B,C and D column range and then loop back to the next value in my A column and repeat.

    Data Entry
    A1 B1 C1 D1
    A2 B2 C2 D2
    A3 B3 C3 D3

    Data Result
    A1 B1 C1 D1
    A1 B2 C2 D2
    A1 B3 C3 D3
    A2 B1 C1 D1
    A2 B2 C2 D2
    A2 B3 C3 D3
    A3 B1 C1 D1
    A3 B2 C2 D2
    A3 B3 C3 D3

    So to put it another way, I am dealing with products that have various defining features:
    Colors (Col. A) Sizes (Col. B) Prices (Col. C) and a Store Category (Col. D)

    The Sizes, Prices, and Store Categories will all be linked across a row.
    I need a macro that will take the first Color in my A Column, and match that up with all of the Sizes, Prices, and Store Categories and deliver to my results tab, then move to the next Color in my A column, continuing to do the same until all of the colors are matched up with the Sizes, Prices and Categories.


    The attached spreadsheet is what I'm working from. The first tab is for data entry and the second tab is where the results will be delivered. I have quite a few formulas in there, but macros are really new to me so I'm not sure to handle what I'm looking for.
    Master Worksheet Macro Enabled WIP.xlsx
    Last edited by staminaboy; 05-24-2013 at 02:28 PM. Reason: Clarification

  2. #2
    Registered User
    Join Date
    05-09-2013
    Location
    Connecticut, U.S.A.
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Looking for a macro that will follow cell A1 with range of columns B/C/D then loop to

    Tried to add some clarity to my original post, hoping that someone will take a look at it.

  3. #3
    Registered User
    Join Date
    05-09-2013
    Location
    Connecticut, U.S.A.
    MS-Off Ver
    Excel 2010
    Posts
    7

    Re: Looking for a macro that will follow cell A1 with range of columns B/C/D then loop to

    So I've been able to make a little progress on this. Attached is my latest update in which I have set up buttons that will transfer the Color and Image columns the appropriate amount of times. My issue with the existing macros are as follows:
    • I can't figure out how to get the data to populate on my second worksheet in columns E and F starting at cell 3 in both.
    • Also, if the button is pressed a second time, I would like for it to rewrite the data that was populated from the first press.
    • Ideally I would like just one button for the Color/Image columns since they should correspond.


    Finally I would like to create a macro button similar to the first that copies whatever is in columns C-E on Sheet1 and populates in G-I, starting at cell 3, on Sheet2 "X" number of times, as defined by cell R2 on Sheet1

    Attached is my sheet with progress:
    Master Worksheet 5-24 Update.xlsx

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Looking for a macro that will follow cell A1 with range of columns B/C/D then loop to

    The attached code gives you the result based on the request you put in post#1, ie A,B,C. I can not test it on your actual data as there sheets are empty. I made two sheets, an input data and the output is on new sheet created by the code itself. You can use it to apply to your needs.
    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)

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