I have a question that is bugging me. I do not understand all the commas, dots and dashes, who what where or how as much as many of you so if you can answer my question please answer without all the computer lingo so I know what your talking about.
But here is my question and a brief summary of my worksheet…
This is for a lye calculator.
Sheet one is an inventory sheet which breaks down all the oils and fragrances by the ounce and when used individually for each loaf of soap it tells correct materials cost.
However,sheet 2 is a lye calculator with list boxes for several oils and fragrances. It gets that information from the inventory sheet. What ever I change on the inventory sheet is reflected in list box. So, while I can change each individual oil by using the list box it will change every thing else correctly. Each oil requires a different amount of lye but at the same time each oil costs differently and the menu is set up to see the changing price as the oils and fragrances are changed.
My problem: Vlookup is telling me the correct price for each individual oil UNTIL (I think?) it hits an empty cell.
For instance: Rows A1:A4 have an oil in each cell. It adds those up correctly. A5 will be blank (or deleted) but when I go to add an oil to A5 the price goes kablooey and it doesn’t add correctly anymore.
To see what I am talking about you can view this link.
I do not make any money on ads or views so I am not trying to sell anything but it continues to bug me why this is not quite correct.
Here is my complete formula in the cell that adds the money…
=IF(ISBLANK(A6),A6="0",((VLOOKUP(A6,MyOils,5,0))*D6))+IF(ISBLANK(A7),A7="0",((VLOOKUP(A7,MyOils,5,0))*D7))+IF(ISBLANK(A8),A8="0",((VLOOKUP(A8,MyOils,5,0))*D8))+IF(ISBLANK(A9),A9="0",((VLOOKUP(A9,MyOils,5,0))*D9))+IF(ISBLANK(A10),A10="0",((VLOOKUP(A10,MyOils,5,0))*D10))+IF(ISBLANK(A11),A11="0",((VLOOKUP(A11,MyOils,5,0))*D11))+IF(ISBLANK(A12),A12="0",((VLOOKUP(A12,MyOils,5,0))*D12))+IF(ISBLANK(A13),A13="0",((VLOOKUP(A13,MyOils,5,0))*D13))+IF(ISBLANK(A14),A14="0",((VLOOKUP(A14,MyOils,5,0))*D14))+IF(ISBLANK(A15),A15="0",((VLOOKUP(A15,MyOils,5,0))*D15))+IF(ISBLANK(A16),A16="0",((VLOOKUP(A16,MyOils,5))*D16))+IF(ISBLANK(A18),A18="0",((VLOOKUP(A18,MyFragrances,4,0))*D18))+SUM(taskCost)+SUM(Packaging)
What this means is If(oil#1 == empty) then {oil#1 == 0} Else { Match oil#1 in MyOils and tell me the pricePerOz; pricePerOz X theQuantityUsedInD6} or at least that is what I think it is doing.
Then add this amount to the next oil in the list .
Your help with this would be greatly appreciated. My wife is actually mad at me because it may overcharge customers if I am not careful.
And most importantly. How to shorten this? Is there away to put cells A6:A16 into an array and then use the array to look up the info? Something has to be better then what I am doing?
Too many places to hide a paperclip! I found it. Here is the file…
The testing tab is the one to test with to show how prices will differ greatly and not a penny or two from rounding.
Ok, This is another version with a completed chart of calculations on the “Testing” tab. These calculations are were calculated by using the recipe menu(Cell Testing.F20), by calculating one ingredient at a time using the inventory tab, and by using an actual calculator. The results are shown
But, an explanation of everything is needed first.
The only things that I need help with is the MONEY portions and these are calculated on the “Testing” tab and “Inventory” tabs. The Inventory tab will calculate an entire recipe one ingredient at a time and the Testing tab uses the information from the Inventory tab to calculate ingredients more quickly.
On the testing tab Cells A6:A17 are list boxes to choose any ingredient and cell A18 is another list box to choose any fragrance for more experimenting if you choose.
I suspect it is a rounding problem BUT by the time everything calculates the difference can affect someone’s wallet. I did notice that the difference between the Inventory tab calculations and the Testing menu were not that huge (Although I have seen it differ by as much as almost $10.00)
There are 7 tabs. Only the “Testing” & “Inventory” tabs are important right now.
“Link is deleted now”
[erAck: edited to display code as code (by indenting by 4 spaces) and not attempting to format funny with asterisks]