Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50151

Error Calculation

$
0
0
So what I'm trying to achieve is calculating the error or parts that failed inspection. How the spread sheet is set up is that each time a part goes through a step of the line, saw placing a screw for example, it then checks it to make sure it was positioned correctly. If not the part is kicked out. On an excel spread sheet this is recorded in a column where 1 is a pass and any other number is a fail. I then insert a new column next to this one and enter =IF(A1=1,0,1) to check which ones passed and failed and copy that down the length of the column. Then I make a sum formula to add all the new 1 values (those that failed) and another equation to simply divide that number by the total items tested on that sheet. Now this is what I need help with. The number of items checked changed slightly each day which messes up the macro due to manually inputting the total number tested each time. Is there a way to get it to know how many tests were recorded and adjust the macro accordingly each time without having to alter the number in the code by hand each day?

Viewing all articles
Browse latest Browse all 50151

Trending Articles