Hello,
I hope some one can help me with this tricky one.
When i Use sumproduct formula i want it to show "-" or or nothing at all insted of 0. Is that possible. I have attached a excel sheet to show what i mean.
Thanks.
Hello,
I hope some one can help me with this tricky one.
When i Use sumproduct formula i want it to show "-" or or nothing at all insted of 0. Is that possible. I have attached a excel sheet to show what i mean.
Thanks.
I would strongly advise using a Custom Number Format to mask 0 with either hyphen or blank rather than double evaluating the SUMPRODUCT.
I am assuming you're using SUMPRODUCT rather than SUMIF because you're data is stored in another file which might be closed
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
Thats correct I am using other workbooks that are closed. I did not understand the conditional formating. Could you pleas show?
Last edited by DonkeyOte; 03-11-2011 at 08:47 AM. Reason: removed unnecessary quote
We're not talking about Conditional Formatting (altogether different [super volatile]) but rather Customising a Number Format.
Instead of formatting your result cell as General, Number etc you assign a Customised Format - see here for a more graphic example
Ok I got it to workbut the thing is that I am using a grapfh and the point of not showing 0 is to have the starting point of the graph not in 0 but the given number by the "sumproduct formula"
Last edited by DonkeyOte; 03-11-2011 at 08:46 AM. Reason: removed unnecessary quote
OK - might have been worth mentioning that a little earlier
What you could do is use something like:
What will then happen is 0's will become #N/A and won't plot - obviously you need to revise the SUMPRODUCT element per your own formula.![]()
=LOOKUP(9.99E+307;CHOOSE({1\2};"";1/(1/SUMPRODUCT(....))))
this type of construct should work
=IF(OR(ISERROR('SUMPRODUCT(($F$28:$F$32=!$B$1)*1;($C$28:$C$32))),'SUMPRODUCT(($F$28:$F$32=!$B$1)*1;($C$28:$C$32))=0),"-",'SUMPRODUCT(($F$28:$F$32=!$B$1)*1;($C$28:$C$32)))
Windows 7 using Office 2007 & 2010
Remember your [ code ] [ /code ] tags, makes reading soooo much easier
@scottylad2, the point here is that avoiding double evaluation (triple in the above) is something of a no-brainer where SUMPRODUCTs are involved
FWIW, there's simply no need to evaluate the SUMPRODUCT three times.
Should you want to persist with repeat calculations I would advise you divide 1 by the SUMPRODUCT result and test for numeric result.
The above is based on the fact that an error or SUMPRODUCT result of 0 would generate an Error, in UK syntax terms:
But again to reiterate I would suggest avoiding the double evaluation altogether and use an alternative construct:![]()
=IF(ISERROR(1/SUMPRODUCT(...)),NA(),SUMPRODUCT(...))
which would also generate either Number or #N/A error whilst evaluating the SUMPRODUCT once only![]()
=LOOKUP(9.99E+307,CHOOSE({1,2},"",1/(1/SUMPRODUCT(...))))
Note use of NA is for sake of chart plot - hyphen/null string etc would behave no differently to 0 in that regard.
Last edited by DonkeyOte; 03-11-2011 at 11:03 AM. Reason: change ISERR to ISERROR
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks