Forum Discussion

iapetustitan's avatar
iapetustitan
Copper Contributor
May 30, 2020

QUestion re Macros and Triggers

Hi.

 

I'm just feeling my way through the intricacies of excel having set up an on-the-fly stock tracking system at work. End of each month I'm archiving the data as values (for the most part) saving into an archive folder and reusing the original form in the shared location, with some updates. I'm doing this manually at the minute and wonder if there is a way to automate the whole thing.

I'm copying data in a column 'Final Totals' and pasting those totals As Values into the 'Initial totals' field.

 

Thereafter, clearing any recorded movement (which zeroes related cells resulting in the 'Final Totals' resetting to match the 'Initial Totals'). 

 

Additionally, I am editing a cell with the Month/year shown to show the next month, prepping the form for use for the upcoming month (currently it's a general field as I wasn't keen on the set up when the cell formatted to 'Date' - I use "May 2020" the auto-format shows "May-20" - but I am up for change if automation is possible).

 

That process needs to be done for a maximum of 3 sheets in the excel doc.

 

I know I can easily make a macro for the Final to Initial totals part, but I'd like to be able to trigger the other parts when the Initial Totals values are updated. Simultaneous application across the three sheets is desirable but not essential. Happy to apply one sheet at a time.

 

Hopefully, that's not too rambling an explanation...can what I'm looking for be done?

 

Cheers

 

Malc

8 Replies

  • mathetes's avatar
    mathetes
    Gold Contributor

    iapetustitan 

     

    Is it possible for you to upload your actual workbook, without disclosing any confidential info?

     

    I ask because in your opening sentence you describe yourself as "just feeling my way through the intricacies of excel," which I take to mean you're acknowledging being something of a beginner with Excel.

     

    Assuming that to be true (and there's no shame at all in that; we all began at some point), it occurs to me that you might benefit from having different set of eyes look at what you're trying to accomplish and perhaps come up with an altogether different way to manage the data in question. It might, for example, make more sense to just maintain a single comprehensive database (in the form of an Excel Table), from which you use Excel to extract the current month's data (or any past month's, for comparison).

     

    Excel has some wonderful tools for that kind of data extraction, summary display, analysis. Yet beginners often mistakenly try to do a lot of that "heavy lifting" on their own, essentially using Excel as if it were an automated ledger sheet, picturing it in their minds as helping doing the various mathematical calculations, but requiring the user to organize the info in a way to make it useful. Sometimes, that is the case. More often, or at least equally often, if you were to approach Excel by giving it lots of data (creating a database, in the form of an Excel Table), you could then use some of the reporting tools built in to it to "automatically" create the summary or analytical display that you want on a weekly or monthly or annual basis.

     

    Hence my request: if you'd be willing to share the work you've already done, it's possible that someone here (I or somebody else) could recommend an altogether different way to think about and design your workbook, a more effective way to accomplish your real purpose.

     

    If that doesn't appeal to you at all, that's fine. I'll defer to somebody else to give you aid on your presenting request.

     

     

    • iapetustitan's avatar
      iapetustitan
      Copper Contributor

      mathetes 

      Attached a version of one of the Workbooks I've set up. I've 'zeroed' out detail just to avoid any infosec issues.

      In total there are three separate versions of this document for different locations and an additional document that pulls the total data from each of the 3 and presents them alongside a cumulative 'National' data total. That sheet is never touched by a user other than to view/archive for the month via a simple (paste to values) macro.

       

      The archive itself is a folder of the individual documents with the 'National' data documents (saved monthly) further linked into an overall Year-to-date Document which pulls data from the National docs and separates into regions as well as showing month to month stock consumption (which managers will pull relevant charts and trends from as they require it)...That's a bit more intensive to zero out info, especially with all the network linked files it references, or I'd post it too. 

       

      ^That make sense?
      Right now it seems to be working well, but I suspect, in the coming months, I'll be asked if we can expand it to cover all stock, not just essential/hard to get at the minute stock.

       

      Any comments or suggestions for improvement will be appreciated.

      • mathetes's avatar
        mathetes
        Gold Contributor

        iapetustitan 

         

        Thank you for posting that file and all of that information. It does look like you're doing more than just "feeling my way through the intricacies of excel" -- there are some very sophisticated formulas in there (behind "protection").

         

        It would be interesting to take time to get into the intricacies of inventory management, but to do so in any truly responsible way would really require both more time and a lot more access to your full system. I'd hesitate even to offer suggestions from this distance.

         

        There are probably people here on the site who've a lot more direct experience with the field of inventory management than I [I've worked with a friend's very small business inventory and sales order database, but nothing more] , so maybe some of them will be able to offer more knowledgeable advice.

         

        Have you looked through the various templates that can be found on-line?

    • iapetustitan's avatar
      iapetustitan
      Copper Contributor

      mathetes 

      THanks for the reply.

       

      I've actually figured out a working means to do what I was looking for but I;m interested in what different approaches might be considered for the system we have. I don't have the sheets to hand just now to post but will do so over the next couple of days. 

       

      It's very ad-hoc right now, set up in relation to the current global crisis and, for me, if it's to keep going I'm all for getting IT guys involved to build a bespoke program (though not rulling out use of excel or similar either). 

      LIke I say, I'll get a copy I can post and get your thoughts.

       

      Thanks again.

      Malc