Excel - Data Validation Override - excel

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.

Related

How to 'feed' data from data tab in other tabs based on criteria?

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.

Generate a report based on check box choices

I am trying to add check boxes to a simple data entry form (I didn't use VBA) to monitor defect types. The problem that I am facing right now is that if an user select more than one check box (there are 15 different check boxes options), I would like to see the chosen options in different cells. I was trying to use the following formula for the each of 15 options:
=if(a1=TRUE,"Name of the defect","")
and then using this other formula to see the name of the defect:
=concatenate(a1,a2,a3,a4,a5,a6,a7,a8,a9,a10,a11,a12,a13,a14,a15,a15)
And this works fine if the person only selected only one defect type, but the problem is that if someone selects more than one type, it will appear: "Defect type1Defect type2". I was thinking to add commas but I would like to see those defect types in other cells instead of having all errors listed inside the same cell. What do you suggest me?

Power Automate "Vlookup" using Sharepoint Lists - Vlookup resetting

I have the below "Vlookup" , When a record gets submitted in list "Template" I want that to reflect in the list "Aug2021"(Created from an excel sheet) in the "Submitted" column as a "Yes" or "No".
Lookup with between "Project ID" in Template, and "Title" in Aug2021.
IT works fine for the first record submission into "Template", The submitted column shows a "Yes" nicely within list "Aug2021" .
However when I submit a 2nd record, the vlookup resets and that first record will no go to a No. Why is this?
This is what I mean - the flow re runs based on the new record.
When Power Automate does not execute the branch I "think" it "should" execute, that always is because the condition is not met.
The only way to troubleshoot that is to look into what is actually being fed into the Condition. At least while you're still developing.
Initialise two variables at the top, one for the Title and one for the Project ID. Write the Project ID into the variable as soon as you have it. Write the Title into the variable before the Condition step.
Now you can see in the flow run what the values are and you can see the reason for the condition branch being executed.
Also note that the For Each loop will run on all records that are returned bye the Get Items step. This looks like it may write a lot of records that don't match the title.
Edit after comment: You say that the list Aug2021 has 2000 items. Are you attempting to loop through all of them in the flow? That won't work, because the Get Items command only returns a maximum of 100 items.
The flow run screenshot shows that it processed exactly 100 items in the Apply to Each loop. Your screenshot only shows the first one.
Unfortunately, you did not follow my recommendation for troubleshooting, so you still don't know which values are being fed into the condition for each instance of the Apply to Each loop.
If you don't follow advice, I have no idea what else to write.

Garbage Data Checker Using Excel VBA

My team and I have created a consolidator tool that consolidates data from worksheets uploaded using a button. However, there's an added enhancement that our leads would like to have.
I don't know if it's possible in VBA but what they wanted is a button that checks and highlights "garbage data" (for example: if First Name column contains a blank or if it contains ajsajdj or something similar), it will prompt the user and ask them if they want to delete it.
We already have the code for the consolidator tool (and it's working perfectly) however, this feature is headache inducing as I don't know if it's possible. I would really like to ask suggestions regarding this as I'm really new to VBA and programming.
Maybe, I would be enlightened on what next step I should take.
Let's see how a human would validate that
He would look at the name ajsajdj and think "I have never seen this name in my life before so it must be nonsense data". But he might fail because the fact that he never came accross this name doesn't mean it's not an existing name (parents can be inventive sometimes).
So what a human actually does is comparing the ajsajdj with a list of names (he has in mind because of his experience in life).
Now a program can do the same
You can write a code that compares ajsajdj with a list of valid names. But here we are at the same point where the human can fail too. The list will never be complete because tomorrow parents invent a new name (that you don't have in that list).
Conclusion
This task cannot be coded unless you define a rule for either valid or invalid data. Some programs look like they could do magic, but actually it is only working because of the rules you give them.
I do automated auditing of this type prolifically so I would approach it like this;
Your 'audit macro' is basically an iterator with many quality checks - is 'name' = "", etc. You can run this auto macro either.
On a single line of data each step of the consolidation
After the consolidation has completed.
The first is easiest to use, and works like this:
After your consolidation step run 'auditing macro' on line of data just brought in.
If an issue is found, write the line of data to a separate Tab leaving column A blank; not to your consolidation. At the end of your consolidation give user a warning message if there have been any issue lines found at the end of the consolidation
User skim reads data on separate tab, puts 1s for 'keep' in Column A.
User clicks a button to run a macro which adds the rows with a '1' against them back to your full data set (e.g. on the end if order doesn't matter).
Equally you could approach this by running the audit when the consolidation is totally complete; in this case you'd need to delete or otherwise track rows which may be removed if a user chooses not to keep them.
I like this approach because it is non-blocking; user can leave your consolidator to run without supervising and then deal with exceptions at their convenience. Also you can write/edit as many tests as you want without fundamentally changing your consolidator at all; you can then also start for example counting the number of each issue per import and putting this into a report for continuous improvement... there are options to extend.
In terms of pseudocode its an iterator full of if-else blocks, with a single 'there is an issue' flag, which if it's 1 causes the row to be treated as an issue;
For rowCount = startRow to endRow
' startRow and endRow correspond to lines of data you just imported
'Test 1
if (Some condition e.g. cells(rowCount ,2).value = "") then
issueFlag = 1
End if
'Test n...
if (Some condition e.g. cells(startRow,2).value = "") then
issueFlag = 1
End if
next rowCount
if issueFlag = 1 then
'CODE TO PASTE DATA
'Set some flag/variable which then triggers a Error Message at the end of the whole consolidation or audit
End if
You can put a Exit For at the end of the IF block so if the issueFlag is triggered you immediately exit and skip all further tests.

How to insert additional data (inserting time periods without data) into an Excel spreadsheet to create more accurate line graphs?

First of all, sorry for the badly worded question, I'm struggling to describe exactly what I'm looking for in a concise way.
I have a spreadsheet which essentially lists the amount of customer requests per month of a given request type (child description), over a three year period.
Using PivotTables, I've been able to summarise this data and create a line graph to display trends over time; this allows me with the click of a button to display a new graph for any of the child descriptions I want, as seen below:
However, a problem arises with some of the request types - not all request types receive customer requests each month, and thus the data I was given is missing those months. It doesn't say '0', it simply isn't there. As seen in the image below, the line graph is a misrepresentation of reality, as there are no 0's, the graph doesn't tell the true story, and can't be used for decision making:
My question is, is there a way to insert the months without data into my spreadsheet in a way other than manually entering it?
Manual data entry is not an option, as I have hundreds of different requests types, and I aim to set this up so I can update it as new data comes in.
Thanks in advance
Thanks to the link provided by Chris Moore, I worked out how to solve my issue.
On the PivotTable, I needed to right click and select 'Field Settings' and select the box 'Show items with no data':
Then I right clicked the PivotTable again and selected 'PivotTable Options', and formatted it so that 'For empty cells show:' was 0:

Resources