AccessGuruCarl
Programmer
Hello All,
I have a spreadsheet that gathers data from several other worksheets. The last worksheet is suppose to display, Total Cases Needed, and the remaining partials if any...
worksheet layout:
Row of Qty per case. 12 columns(Items)
Next Row: Line Item Totals(per item) from 4 different worksheets.
Then I have several rows that follow:
Cell C12=Item1: D13=CaseCnt D14=ContCnt
.... Item2
.... Item3
I formatted cell D13 as a number with 0 decimal places.
I then use this formula in cell D13: =(F9) / (F6)
Cell F6 being the Qty per case and F9 is total items needed.
This works great... Example 6 per case, Qty needed is 14...
How do I get cell D14 to return the balance of 2 in this example?
I tried this: =(F9) - ((D13) * (F6))
=total items needed - (CaseCnt*QtyPerCase)
but it returns 0.0 unless you carry it out 7 decimal places
Any idea's anyone....
I was also wondering if the immediate IIF statement could be used... Some case qty's are only 1, where then all I need is the total items needed. But then how do write the formula again for cell D13 to write a zero testing for a remainder???
I'm trying to stay away from VBE editor, as I don't want the macro warning to load at startup. But if it's the only way... A small piece of sample code would be appreciated...
I have no idea where I'd begin writing the code in excel...
Although I am familiar with it's VBA editor it's the excel vba I have no real knowledge of...
Thanks in advance...
AccessGuruCarl
Programmers helping programmers
you can't find a better site.
I have a spreadsheet that gathers data from several other worksheets. The last worksheet is suppose to display, Total Cases Needed, and the remaining partials if any...
worksheet layout:
Row of Qty per case. 12 columns(Items)
Next Row: Line Item Totals(per item) from 4 different worksheets.
Then I have several rows that follow:
Cell C12=Item1: D13=CaseCnt D14=ContCnt
.... Item2
.... Item3
I formatted cell D13 as a number with 0 decimal places.
I then use this formula in cell D13: =(F9) / (F6)
Cell F6 being the Qty per case and F9 is total items needed.
This works great... Example 6 per case, Qty needed is 14...
How do I get cell D14 to return the balance of 2 in this example?
I tried this: =(F9) - ((D13) * (F6))
=total items needed - (CaseCnt*QtyPerCase)
but it returns 0.0 unless you carry it out 7 decimal places
Any idea's anyone....
I was also wondering if the immediate IIF statement could be used... Some case qty's are only 1, where then all I need is the total items needed. But then how do write the formula again for cell D13 to write a zero testing for a remainder???
I'm trying to stay away from VBE editor, as I don't want the macro warning to load at startup. But if it's the only way... A small piece of sample code would be appreciated...
I have no idea where I'd begin writing the code in excel...
Although I am familiar with it's VBA editor it's the excel vba I have no real knowledge of...
Thanks in advance...
AccessGuruCarl
Programmers helping programmers
you can't find a better site.