+ Reply to Thread
Results 1 to 3 of 3

auto-fill columns based on data in different columns

  1. #1
    Registered User
    Join Date
    03-25-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2016
    Posts
    98

    auto-fill columns based on data in different columns

    Attached I have an example of what I would like to accomplish.

    In column A I have the website of toy stores I will look at for gifts.
    In column B is a list of the toys I am looking for (this will be the same list of toys at all stores)
    As you will see on the attached I have Toys-R-Us listed 12 times, one for each specific toy
    Then starting at line 14 Kmart is listed 12 times again with the same 12 toys repeating
    So this list will be very long

    In Column E I have the list of the toy stores websites that I want to search (5 for this example)
    And finally in column F are the 12 toys

    What I’m wondering is it possible to have the website of the store in column E automatically added in column A equal to the number of times that there are toys in Column F? Basically can I just add or delete a store from E and/or add or delete a toy from F and have it do all the adding and deleting from A & B?

    It would need to add or delete rows as required, so if my example was fully filled out I would have 5 groupings of 12. If I delete toy number 7 it would remove that line from each of the 5 groupings in Columns A & B. (This would be a nice to have but not a must.)

    Lastly I believe the file type has to be a .xlsb for the macro to work, I hope that doesn’t limit options too much.

    Thanks in advance for taking the time to read this.

    Dave
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    08-02-2013
    Location
    Québec
    MS-Off Ver
    Excel 2003, 2007, 2013
    Posts
    1,412

    Re: auto-fill columns based on data in different columns

    Hello dawondr,

    Here's a code suggestion. Let me know if you have any questions.
    Insert the code in a module and run it. The list will be updated everytime you run the code.

    Please Login or Register  to view this content.
    GC Excel

    If this post helps, then click the star icon (*) in the bottom left-hand corner of my post to Add reputation.

  3. #3
    Registered User
    Join Date
    03-25-2012
    Location
    New Jersey
    MS-Off Ver
    Excel 2016
    Posts
    98

    Re: auto-fill columns based on data in different columns

    That is perfect! it even adds a line to existing lists, I didn't think that would be possible. Thank you very VERY much

+ 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. Auto-fill Columns based on the value of variable
    By NeoDasari in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-18-2015, 08:37 PM
  2. Excel - Auto fill multiple columns based on cell Value
    By davidx100 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-20-2015, 12:43 PM
  3. Add two columns and fill columns based on other column data
    By gcoug in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-21-2011, 06:52 PM
  4. Replies: 8
    Last Post: 12-04-2010, 01:20 PM
  5. Replies: 2
    Last Post: 10-12-2009, 08:23 AM
  6. Auto Fill Columns Based on List Selection
    By Pera in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-08-2009, 03:12 PM
  7. [SOLVED] Auto fill Column based on data in other columns
    By SITCFanTN in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 06-06-2006, 04:10 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