I feel like a bit of a twat but apologies to Scooba, yours worked fine. For some reason Excel was putting the results in a white font on a white background so it looked like there was nothing there.
Wow, seeing your avatars together is like needles in my eyes!
Anyway, there's another Excel problem(!)
Sales are input in another column on sessional control form and used to calculate a variance (sales - consumption = variance). Sometimes the variance will produce a negative number (a deficit) and the formula really doesn't like this idea...
After creating a big forehead shaped dent in my keyboard I bugged some clever people on IRC and we got to working on this:
Where B1 is where the number is. The above converts the variance number into dozens...
What's the dozens to decimal equivalent of this please? Sorry it keeps getting more complicated. ;(
(And Jup, with the above I changed the "00" to "0" to see if it worked ok without the leading 0, and it did... was it the other formula that needed it? Because I think I've confused myself a lil bit.
Add to what I put before and hide non relevant columns.
I2: input your sales in the dozens format
J2: =(INT(I2)*12+MOD(I2,1)*100) this is decimal sales number
K2: =J2-H2 this calcs the variance using the decimal numbers
L2: =IF(K2>=0,TEXT(INT(K2/12),"0")&"."&TEXT(MOD(K2,12),"00"),"-"&TEXT(INT(ABS(K2)/12),"0")&"."&TEXT(MOD(ABS(K2),12),"00")) this gives the result and corrects if negative in the required display format.
All you need to do is take the ABS(Number) to convert to positive and in cases where variance is negative you do the display on this and insert a '-' char in front.
Oh, and it may appear to work fine with "0" rather than "00" in the formula but there are cases where it won't CaLLous, so play safe please
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.