+ Reply to Thread
Results 1 to 15 of 15

Macro action for making suggestions to missing terms

  1. #1
    Registered User
    Join Date
    02-27-2015
    Location
    miami
    MS-Off Ver
    2013
    Posts
    9

    Post Macro action for making suggestions to missing terms

    My company uses Excel to write out rental orders. Sometimes they forget to add corresponding details. I am attempting to create a search and advise macro to work with excel. In the sense that if a client orders "A item" then "B item" should be there. If not the macro can inform the user that "B item" should be there too.

    Any help would be great.

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro action for making suggestions to missing terms

    Many ways to crack this egg. The way I would do it is if an item is added to the order, I would have a "checklist" where I can see all the items that go together that item is listed as a part of. Then I would go through those items and check each one to see if it is on the order already and add it automatically if it is not.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    02-27-2015
    Location
    miami
    MS-Off Ver
    2013
    Posts
    9

    Re: Macro action for making suggestions to missing terms

    Yeah, that would require thinking on the behalf of the person entering the data. I need something that can search the document for the key terms, and if it is missing the "response" to that term it lets you know. Like that "Item A" and "Item B" scenario. If it was just a handful of people that I was creating a reference document thats fine, but a revolving 40 employees can get tedious and frustrating. Hence automation.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro action for making suggestions to missing terms

    Yes, I agree. As noted in my initial response I would have created a lookup sheet in advance that has grouped all the related items together and possibly coded them.

    Please Login or Register  to view this content.
    With this, possibly hidden, sheet it is easy to find any item in the list, check it's GROUP and then run through all the items in that group adding them to the order if needed.

  5. #5
    Registered User
    Join Date
    02-27-2015
    Location
    miami
    MS-Off Ver
    2013
    Posts
    9

    Re: Macro action for making suggestions to missing terms

    Ok I see what you are saying. Ill check that route. Thanks

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro action for making suggestions to missing terms

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  7. #7
    Registered User
    Join Date
    02-27-2015
    Location
    miami
    MS-Off Ver
    2013
    Posts
    9

    Re: Macro action for making suggestions to missing terms

    Oh IM not sure yet. Still working on it. Not sure how to attach that list, say, to a button? That will analyze the first page.

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro action for making suggestions to missing terms

    I would recommend automating the process through a Worksheet_Change event.

    1) User enters a product on the order in a specific column
    2) Macro activates itself and disable all other macros temporarily
    3) Macro looks up the product added on the hidden product sheet and locates the group code
    4) Macro takes the first item from the product sheet in that same group code and checks the order to see if it is there already
    no - adds it to the order
    yes - moves on
    5) Macro continues checking all the items in that group until it has run through them all adding the ones needed
    6) Macro turns other macros back on and aborts.

  9. #9
    Registered User
    Join Date
    02-27-2015
    Location
    miami
    MS-Off Ver
    2013
    Posts
    9

    Re: Macro action for making suggestions to missing terms

    That's great. But I don't necessarily want it to add automatically. Is it possible for a window to pop up letting it know that it's "missing its group partner"?

  10. #10
    Registered User
    Join Date
    02-27-2015
    Location
    miami
    MS-Off Ver
    2013
    Posts
    9

    Re: Macro action for making suggestions to missing terms

    http://www.ozgrid.com/VBA/run-macros-change.htm

    I found this. I think this is kind of what you are talking about.

    Keep in mind, I am kind of new to Excel, but not new to computer language and how it works.

  11. #11
    Registered User
    Join Date
    02-27-2015
    Location
    miami
    MS-Off Ver
    2013
    Posts
    9

    Re: Macro action for making suggestions to missing terms

    What Im noticing about the WorkSheet_Change is that it is based on cell or a certain amount of cells that change. How can base something like a cell change, but with a word. I need it to be able to look for LAV and know that EQ should be there as well.

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro action for making suggestions to missing terms

    I can't imagine spending time to develop an ordering tool and not have it be the most user-friendly. Having users have to read and absorb the detailed info of a popup and then close the popup and then manually go add the same item to the order is my definition of non-user-friendly.

    I would recommend you add required items automatically if they are required and missing, else not bother with this. If there is some rare moments where the required additional items are not really needed, the user would be able to delete them. Seems to me this would be the exception.

  13. #13
    Registered User
    Join Date
    02-27-2015
    Location
    miami
    MS-Off Ver
    2013
    Posts
    9

    Re: Macro action for making suggestions to missing terms

    If it were automatic, Would the macro be able to added to the line item, including number of days, number of units, cost of the unit, and total cost*days?

    My list compiles of about 20 different If/then scenarios.

    Would you be available to look at our existing form? Maybe you can see what I am dealing with.

  14. #14
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro action for making suggestions to missing terms

    I'm up for reviewing your work and answering your specific questions as you do your work. Or are you looking for someone to do this work for your company as a turn-key solution?

  15. #15
    Registered User
    Join Date
    02-27-2015
    Location
    miami
    MS-Off Ver
    2013
    Posts
    9

    Re: Macro action for making suggestions to missing terms

    I'd like to learn and do it myself. That way I'll know how to make updates for the future. Is there way to do it by word search and not just by searching certain cells? Because each sales person kind of has their own format, it's hard to say that EQ will always be in cell B17 and if LAVLAIER is in Cell B18 then EQ should be in B17. I need the sheet to be basically "scanned" for the word EQ and then scan for Lavalier and if it see EQ and not Lavalier, then a warning or a note or something should pop up basically saying, you should really add that in. I know it may sound backwards or counter productive to you, but I'm coming into a 10 year system. What happens to me is Im on site setting up a Lavalier and then founding
    out last minute that an EQ was not ordered. Does that make better sense?
    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)

Similar Threads

  1. Replies: 1
    Last Post: 01-26-2015, 04:42 PM
  2. Making a Macro add a date after completing action
    By Bestia in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 12-22-2014, 01:01 PM
  3. making action buttons to add and subtract cells
    By orbir1 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 12-19-2013, 09:24 AM
  4. Missing in Action
    By day92 in forum The Water Cooler
    Replies: 9
    Last Post: 06-30-2012, 02:46 AM
  5. not allow a save action if ANY data is missing
    By matt7102 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-26-2008, 05:18 PM

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