+ Reply to Thread
Results 1 to 12 of 12

Showing a dash to represent a zero

  1. #1
    Forum Contributor
    Join Date
    07-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    123

    Showing a dash to represent a zero

    =IF($C$2="NO STACK/SNOWBALL","-",
    IF(AND($C$2="SNOWBALL SET PLUS EXCESS (LOWEST BALANCE)",R95=SMALL($R95:$AC95,COUNTIF($R95:$AC95,0)+1)),$BA101,
    IF(AND($C$2="STACK SET PLUS (OPT) EXCESS (NO SNOWBALL)",R96=MAX($R96:$AC96)),$C75,
    IF(AND($C$2="STACK SET PLUS (OPT) EXCESS (SNOWBALL)",R96=MAX($R96:$AC96)),$C75+$AO101,0))))

    How do I get the second formula to show a dash if R95-AC95 all show dashes representing a zero?

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Showing a dash to represent a zero

    =SMALL($R95:$AC95,COUNTIF($R95:$AC95,0)+1) will return an error if all 0 or all -
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Forum Contributor
    Join Date
    07-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    123

    Re: Showing a dash to represent a zero

    Didn't work

  4. #4
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Showing a dash to represent a zero

    what didn't work? im just saying that part of the formula will always be an error if $R95:$AC95 are all 0 or -
    so
    ,R95=SMALL($R95:$AC95,COUNTIF($R95:$AC95,0)+1)
    would evaluate as

    R95=#NUM! so if you leave c2 blank or try anything else in there EXCEPT NO STACK/SNOWBALL the formula will give #NUM!
    so you need to decide what to do if its an error
    probably easiest is to wrap it in iferror and give a value r95 cannot = say "x"
    then change the last bit from 0 to -
    =IF($C$2="NO STACK/SNOWBALL","-",
    IF(AND($C$2="SNOWBALL SET PLUS EXCESS (LOWEST BALANCE)",R95=IFERROR(SMALL($R95:$AC95,COUNTIF($R95:$AC95,0)+1),"x")),$BA101,
    IF(AND($C$2="STACK SET PLUS (OPT) EXCESS (NO SNOWBALL)",R96=MAX($R96:$AC96)),$C75,
    IF(AND($C$2="STACK SET PLUS (OPT) EXCESS (SNOWBALL)",R96=MAX($R96:$AC96)),$C75+$AO101,"-"))))

  5. #5
    Forum Contributor
    Join Date
    07-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    123

    Re: Showing a dash to represent a zero

    I had IF(AND($C$2="SNOWBALL SET PLUS EXCESS (LOWEST BALANCE)",R95=SMALL($R95:$AC95,COUNTIF($R95:$AC95,0)+1)),$BA101

    This is almost the same except the beginning and ending
    =SMALL($R95:$AC95,COUNTIF($R95:$AC95,0)+1)

    I need the same formula except to produce a dash if R to AC are all dashes or zeros

  6. #6
    Forum Contributor
    Join Date
    07-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    123

    Re: Showing a dash to represent a zero

    That worked, the x did it, thank you for clarifying

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Showing a dash to represent a zero

    read my last post

  8. #8
    Forum Contributor
    Join Date
    07-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    123

    Re: Showing a dash to represent a zero

    If you say that it will only for work for the 2nd, to show dash if they are blank or have a dash, then how would you do it for the thrid and fourth to show a dash if R to AC are dashes?

    =IF($C$2="NO STACK/SNOWBALL","-",
    IF(AND($C$2="SNOWBALL SET PLUS EXCESS (LOWEST BALANCE)",R95=IFERROR(SMALL($R95:$AC95,COUNTIF($R95:$AC95,0)+1),"x")),$BA101,
    IF(AND($C$2="STACK SET PLUS (OPT) EXCESS (NO SNOWBALL)",R96=MAX($R96:$AC96)),$C75,
    IF(AND($C$2="STACK SET PLUS (OPT) EXCESS (SNOWBALL)",R96=MAX($R96:$AC96)),$C75+$AO101,"-"))))

  9. #9
    Forum Contributor
    Join Date
    07-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    123

    Re: Showing a dash to represent a zero

    I tried doing what you said with the third and fourth but it didn't work (putting the iferror and the X)

    =IF($C$2="NO STACK/SNOWBALL","-",
    IF(AND($C$2="SNOWBALL SET PLUS EXCESS (LOWEST BALANCE)",R46=IFERROR(SMALL($R46:$AC46,COUNTIF($R46:$AC46,0)+1),"x")),$BA52,
    IF(AND($C$2="STACK SET PLUS (OPT) EXCESS (NO SNOWBALL)",R47=IFERROR(MAX($R47:$AC47)),"x",$C26,
    IF(AND($C$2="STACK SET PLUS (OPT) EXCESS (SNOWBALL)",R47=IFERROR(MAX($R47:$AC47)),"x",$C26+$AO52,"-"))))

  10. #10
    Forum Contributor
    Join Date
    07-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    123

    Re: Showing a dash to represent a zero

    I'm assuming like this??

    =IF($C$2="NO STACK/SNOWBALL","-",
    IF(AND($C$2="SNOWBALL SET PLUS EXCESS (LOWEST BALANCE)",R46=IFERROR(SMALL($R46:$AC46,COUNTIF($R46:$AC46,0)+1),"x")),$BA52,
    IF(AND($C$2="STACK SET PLUS (OPT) EXCESS (NO SNOWBALL)",R47=IFERROR(MAX($R47:$AC47),"x")),$C26,
    IF(AND($C$2="STACK SET PLUS (OPT) EXCESS (SNOWBALL)",R47=IFERROR(MAX($R47:$AC47),"x")),$C26+$AO52,"-"))))

  11. #11
    Forum Contributor
    Join Date
    07-18-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    123

    Re: Showing a dash to represent a zero

    That worked, I'm wondering why it will not work for other formulas such as this? Where if the 37 and 44 are blanks or one is blank...showing an error

    =MAX(IF($C$2="NO STACK/SNOWBALL", S37,
    IF($C$2="STACK SET PLUS (OPT) EXCESS (NO SNOWBALL)",S37-S44,
    IF($C$2="SNOWBALL SET PLUS EXCESS (LOWEST BALANCE)",S37-S44,
    IF($C$2="STACK SET PLUS (OPT) EXCESS (SNOWBALL)",MAX(IF(S$8=0,0,ROUND(S37-S44,2)),0),0)))),0)

    The IFERROR and "X"...

  12. #12
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Showing a dash to represent a zero

    i can only suggest at the moment replacing
    R96=MAX($R96:$AC96)
    with
    R96=IF(COUNTIF($R96:$AC96,"-")=12,"x",MAX($R96:$AC96))

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. SUM showing negative number, need anything below zero to show a dash
    By astole in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-23-2013, 05:03 AM
  2. how to best represent data
    By NJ007 in forum Excel Charting & Pivots
    Replies: 0
    Last Post: 05-14-2013, 10:19 PM
  3. Can text represent a value.
    By RachelW in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 07-26-2009, 06:42 AM
  4. Let text in A represent value in B
    By lalli945 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 07-21-2008, 02:33 PM
  5. understanding dash dash in a excel formula
    By ldebner in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-31-2005, 10:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1