+ Reply to Thread
Results 1 to 2 of 2

Not sure where to start - Macro, formula?

  1. #1
    Registered User
    Join Date
    09-19-2017
    Location
    PHX, AZ
    MS-Off Ver
    2010
    Posts
    1

    Lightbulb Not sure where to start - Macro, formula?

    Hi all - I'm trying to create a solution for a tedious process, but I haven't made enough progress in the Excel is Fun youtube series to understand where to go. Could someone point me in the right direction? I feel that vlookups and maybe macros could be involved, but I don't really know at this point. It may be simpler than I'm thinking.

    [forgive me plz, I'm not going to mess with html tables right now]
    I have a file with 2 books.
    Book 1 contains a list of ~100 people, and includes a column for which group they're in.


    1Name - - 2Group - - - - 3Requirement string
    aJohn - - Beginner StarterPack
    bMark - - Intermediate StarterPack,IntermediateExtras
    cDoug - - Advanced IntermediateExtras,AdvancedPack





    Book 2 contains the various groups in rows, what items they need in columns, and a boolean X to denote if they need it.


    1bRole - - 2bStarter Pack - - 3bIntermediate Extras - - 4bAdvanced Pack - - Requirement StringB
    aB Beginner X [ ] [ ] StarterPack
    bB Intermediate X X [ ] StarterPack,IntermediateExtras
    cB Advanced [ ] X X IntermediateExtras,AdvancedPack



    I want book 1's column 3, Requirement string, to create one string of "needed items" from book 2, referencing which group the person is in from book 1, seperated by commas without spaces. So for 3a, it would be "StarterPack", for 3b, it woul dbe "StarterPack,IntermediateExtras", and for 3c, it'd be "IntermediateExtras,AdvancedPack".

    I think a simpler alternative is to create the string directly on book 2. Maybe some combination of an IF, AND, and Concatonate formulas might be what i'm looking for, but the more I think about it, the dizzier I get as I comprehend how to write it with over 100 rows and columns to parse.

    Any ideas or suggested studies?
    Last edited by kicktown; 09-19-2017 at 03:51 PM.

  2. #2
    Forum Contributor
    Join Date
    08-16-2012
    Location
    Pendleton, OR
    MS-Off Ver
    Excel 2013
    Posts
    129

    Re: Not sure where to start - Macro, formula?

    I am assuming that the requirement string in book1 is currently empty and you want to fill it from book2. This can be done with a VLOOKUP statement in the requirement string column of book1.

    =VLOOKUP($Bx, 'book2'!B2:F5, 5, 0)

    Then copy this through the 3rd column of book1.

    This will be easier to see if you can attach a short file and I can add the command. The x here refers to the row numbers,,B2:F5 is the lookup table from book2 and 5 is the column to lookup. This column can be generated with IFs from the checked columns.

+ 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 formula fill start at a specific row
    By petercass88 in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-18-2017, 05:06 PM
  2. Replies: 0
    Last Post: 02-25-2016, 12:17 PM
  3. Writing a formula in a macro. How do I define the range as "start to end?"
    By ChrisF79 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-06-2013, 02:58 PM
  4. Start a macro when the VALUE of a formula changes
    By Sarangsood in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 11-30-2011, 01:59 AM
  5. Macro to insert this formula automatically on start up
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-07-2005, 06:25 PM
  6. Alter data or start macro from a date formula
    By DavidM in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-03-2005, 02:05 PM
  7. Can I start a macro from a cell by using a formula
    By PraxisPete in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-08-2005, 05:28 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