I am working on a spreadsheet that tracks inventory. Basically each week the user goes in, sets his inventory to be used that week, compares it to the current stock and tells him when to order more.
The issue I am having is once the inventory for the week has been chosen how can I get it to update the stock permanently when he exits the spreadsheet?
Specifically then user picks the client name from a drop down menu, that in turn uses a VLOOKUP to show the items the customer needs. From there it COUNTIFs what is needed by all customers and posts it next to the # of each item on hand(refrenced from the "stock" sheet)...I am hunky dory to this step. I can't seem to make the leap to having the amount in stock update upon completion so that when the next user opens the file (multiple copies cannot be opened at once, already set that up) the sotck is current.
Make sense?
OK for a VBA free (sort of) solution you could use a macro. You have in 1 column the current stock, next to it it you have the amount to be deducted from it before exiting the workbook. You will need to add another column that is the amount after deduction. I'm guessing you would know how to set that up if you are using VLOOKUP.
Next step is to record the macro. I'm not sure which version of Excel you are using, but for Excel 2003 you would go to Tools -> Macro -> Record new macro. This will lead to the macro dialog box, chose a name e.g. Update. It would probably be best to chose a shortcut key e.g. u. click OK to start recording the macro.
Highlight the column with the amount after deduction and use edit -> copy. Highlight the column with the current stock and use edit->paste special and chose values and click ok. Finally click on the stop button on the macro recorder.
If you make a mistake, simply click on stop, and go to Tools -> Macro -> Macros select the macro you have recorded and click delete and then yes. Then start again.
In order to run the macro the user would have to either goto Tools -> Macro -> Macros and click run or press Ctrl + shortcut key e.g. Ctrl+u.
A word of warning, macros are not normally undoable so if the user makes a mistake e.g. running it twice they should exit without saving and start again.
Your probably going to need to use VBA.
Cant really give you any examples because I cant see the layout of your workbook and it would depend on how you want to update the list.
You could update the stock count, fairly simple to do but not very safe unless you trust all the users to get it right every time.
If you wanted a little more safety, you could have a sort of "transaction" sheet which stores the change to the stock count for each job entered. Allowing you to fix or remove any erroneous entries. This wouldn't update the main stock list so you would want to periodically merge your transaction sheet.
Update
I've had a quick go at making something using VBA. Again, since I don't know how your book is laid out etc I've just played about. It might be helpful, might not.
Example Workbook
The workbook has 3 sheets: Stock, Adjustment, Log.
Stock
A list of products, the quantity on hand and a re-order threshold
Adjustment
Used to 'adjust' the stock... user enters a product name and the requirement.
The worksheet shows the SOH, the adjusted SOH and advises weather a product needs to be reorderd. (depends on the adjusted SOH and threshold set on the stock sheet)
If the adjustment sheet is populated, when a user saves the workbook they are asked to either update the list (which clears the adjustment sheet), not to update the list (saves the adjustment list for later use without updating stock) or to cancel.
If the adjustments are saved, the information for each adjustment is copied to the log sheet along with a timestamp to allow you to track the changes. If an non-stocked (or mistyped) product is found, it is skipped and the user is told at the end.
Related
Ideally this file will take an Order number and based on certain column aspects feed it into the respective tab. (For Reference we will be taking data from a car repair shop to determine if the car being worked on has been scheduled for drop off, at the shop, or completed and left the shop.
For Example we will have an Order number for every Car we work on, this car will have a Date Started & date Completed. Based on these criteria it will take the Order Number and drop it into the correct Tab and the rest of the data will populate with xlookup (or up for something better to try). So as the life of the product is updated it flows to the appropriate tabs.
Data Tab --> Comprehensive List of all Cars(including cars not scheduled) --> Cars being worked on --> Completed Cars
I figured 90% of this can be solved using xlookup and IF statements but where I get stumped is how do I pull the specific Order Numbers into the respective tabs from the Data tab.
I am aware that I need to create a formula to check if a car has been scheduled for drop off vs it being finish so it doesn't find it's way into the complete tab but that should be easy once I am able to pull Order number's into the file.
Not Necessarily looking for an answer but some topics/videos to point me in the right direction:)
I have tried just pasting the data and xlookup the details from the Order Number but that just brings back the manual aspect of the workbook.
the way i am thinking about this is java terms would be:
If(order # = In Shop)
RO# Populates into "cars being Worked on" Tab
but for each tab
Am I going to need to use VBA/Macro to get the desired result or is there something simpler I am missing?
Not Necessarily looking for an answer but some topics/videos to point me in the right direction:)
If you don't want to build a VBA implementation, I'd look into using Power Query. I find Power Query to be a pretty low barrier tool as it has quite an intuitive UI and loads of material on the web.
This implementation would most likely have an input table on one tab and then the other tabs (WIP, Completed, etc.) would be connected to this input table.
I'm working on a project for our fabrication warehouse. Currently, we have a system where the workers will type in what order they are working on their tablets and then the part numbers, dimensions, etc will all autofill based on a query of all currently open manufacturing orders...
Whenever we have a prototype or expedited part it won't show up in the query. I was wondering if anyone knew some VBA code (or simpler solutions) that would allow us to keep the current data validation but also give operators an option to override.
Example series of events:
1- operator receives and types in order number
2- msgbox pops up saying "this doesn't exist --- is this a prototype or expedited part?" (answer Y/N)
3- Override message pops up "are you sure xxxx is the correct part number" (operator selects yes)
4- data gets inputed as usual but requires manual entries for dimensions, parts used, etc.
psuedo code:
steps 1-3 : a series of if statements and message boxes guiding the decisions is not too difficult
step 4: where im getting tripped up... how would i unlock that row so they could have custom input for that order and then lock it again once they are finished.
Just a suggestion.
What if you add a non-protected column to the file (assuming that each row is a new entry and entry details are stored in columns).
So, one column with data validation and a warning with the text you mentioned.
And another column to enter the order number manually.
I am trying to create a code which will be executed with a click of a button in the excel sheet and will ask me for an input of a cell value in excel which will then take all the data from that cell's row and insert it accordingly in the word template where the mail merge tags are.
for example :
I have data like this in my excel sheet :
ID(A1), Name(B1), Last Name(C1), Country(D1), Date(E1)
378232625(A2), John(B2), Smith(C2), United States(D2), 29/02/2020(E2)
322783145(A3), Joshua(B3), Brand(C3), United States(D3), 27/02/2020(E3)
I want to have a button which will ask for an ID input and will then take all the other info of that person and place it in the word template in the correct place.
For example:
When a user runs the code it will pop up an input box and it will ask him to type an ID,
for example: 322783145
it will then check where the ID is placed(which row in A column) in the excel sheet which is A3 for this example and will pull the rest of this person's information into the word template I have created beforehand.(ID, Name, Last Name, Country and Date).
Later on I want to be able to automatically save it to pdf as well with the same button but first I want this to work.
Thanks in advance :D
You don't need VBA for this with the question as originally posted - simply use a SKIPIF field coded as:
{SKIPIF{MERGEFIELD ID}<> {FILLIN "Which ID do you want?" \o}}
or:
{SKIPIF«ID»<> {FILLIN "Which ID do you want?" \o}}
where 'ID' is the name of the data field in Excel you want to the merge to process.
With that, only the record containing that ID will be processed. No VBA required.
Note: The field brace pairs (i.e. '{ }') for the above example are all created in the document itself, via Ctrl-F9 (Cmd-F9 on a Mac or, if you’re using a laptop, you might need to use Ctrl-Fn-F9); you can't simply type them or copy & paste them from this message. Nor is it practical to add them via any of the standard Word dialogues. Likewise, the chevrons (i.e. '« »') are part of the actual mergefields - which you can insert from the 'Insert Merge Field' dropdown (i.e. you can't type or copy & paste them from this message, either). The spaces represented in the field constructions are all required.
I see that you've added two new requirements, viz:
the mailmerge to be run from a button in Excel; and
for it "to be able to automatically save it to pdf as well".
You really shouldn't move the goal posts this way. Nor should you ask ask multiple distinct questions in the same thread. For code to run a merge from Excel (and send the output to PDF), see Run a Mailmerge from Excel, Sending the Output to Individual Files in the Mailmerge Tips & Tricks thread at: https://www.msofficeforums.com/mail-merge/21803-mailmerge-tips-tricks.html. Of course, once you get into using a macro such as this, you will need to add the logic for the ID selection to that code. Ask in a separate thread if you can't figure that out.
I am an Advanced Emergency Medical Technician and am trying to make a user friendly excel workbook to keep track of our inventory on our Ambulance. I want to be able to allow users to add new items to a specific cell range or delete items from specific cell ranges by using a form only as some of the individuals I work with are no were savvy with excel. I would potentially a have sheet with items from every cupboard and at the bottom of every cupboard list have a button that would open a userform that would allow items within a specified named range to be deleted or new items to be added based on a user selecting something like place item above or below the row of an item they have selected. I am currently working from scratch on this one as I cant find anything to even start with.
I'm trying to make a small info sheet that has a drop down menu with a bunch of names. When you pick a name it automatically fills out a bunch of info on them. I also want it to have a checkbox that is checked if that person has a job. The problem I'm having calling/saving that value.
I'm trying to make it so all the saved information is on a second hidden sheet. Calling the information is easy enough. But changing it and having it save over what was previously there seems really hard.
Well, in the hidden sheet you should reserve one column with all the names and another column with two values that tells wether the person has a job or not, so say either 1/0 or Y/N.
The checkbox click/change event is what causes the column with the Y/N values to change. So I would just simply change the relevant value in the column that has al the Y/N values.