How to get an empty cell when SUM cells are empty?

When doing a SUM, I want the result to be blank if there are no numbers yet. In Excel, if you have =SUM(A6:A30) with empty cells, the result is an empty cell.
In Numbers, it's a zero.
I know you can use =IF(SUM(A6:A30)>0,SUM(A6:A30),"") to put an empty string in the cell if there's nothing to add, but this doesn't work for negative numbers.
I tried =SUMIF(A6:A30,"count(A6:A30)>0") and it puts a zero there even if all the cells are blank, and I don't think it's correct anyway.
=IF(SUM(A6:A30)>0,SUM(A6:A30),(IF(SUM(A6:A30)<0,SUM(A6:A30),"")))
works, but it seems rather cumbersome.
Is there a better way?
Ideas?

Terrell Smith wrote:
=IF(SUM(A6:A30)>0,SUM(A6:A30),(IF(SUM(A6:A30)<0,SUM(A6:A30),"")))
works, but it seems rather cumbersome.
</div>
Hello
The best way I found to solve your problem is:
=IF(COUNT(A6:A30),SUM(A6:A30),"")
Which reads:
if at least one cell of the range (A6:A30) contains a numeric value returns SUM(A6:A30)
else
returns a blank cell.
Of course, if the sum is nil the displayed [thanks you Barry ;-)] value will be a zero.
Maybe it's what schubladenschrank was offering but I don't read Deutsch.
Just for info, your formula may be shorten as:
=IF(SUM(A6:A30)=0,"",SUM(A6:A30))
Yvan KOENIG (from FRANCE samedi 2 février 2008 13:55:43)

Similar Messages

  • How to get days and months when two dates are given

    Hi All,
    I have a requirement where I need to return the number of months and days between given dates.
    I dont need to take the year into account as the dates difference is always less than an year
    I have 28-jun-2012 and 31-jan-2013 as dates.
    I'm working on 10g
    when I do select months_between(:a,:b) from dual and provide those dates it gives me 7.09677
    I want it to give as 7 months and 9 days or what ever the exact days are.
    Your inputs are much appreciated

    BluShadow wrote:
    874719 wrote:
    Thanks a lot,BluShadow for your answer and would you mind giving it for the year as well like 0 years 7 months 3 days?Your original post said:
    I dont need to take the year into account as the dates difference is always less than an yearNow you've got the idea, why not have a go yourself first, and then if you're still not getting it, post what you've tried so we can help you.Oh... go on... I'm in a good mood today...
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select date '2012-06-28' as start_date, date '2013-01-31' as end_date from dual union all
      2             select date '2012-02-29', date '2012-06-30' from dual union all
      3             select date '2010-02-28', date '2012-06-30' from dual union all
      4             select date '2012-02-29', date '2012-06-15' from dual
      5            )
      6  --
      7  select start_date, end_date
      8        ,months_between(end_date,start_date) as mnth_bet
      9        ,floor(months_between(end_date,start_date)/12) as yr
    10        ,floor(mod(months_between(end_date,start_date),12)) as mnth
    11        ,case when to_number(to_char(end_date,'DD')) >= to_number(to_char(start_date,'DD')) then
    12           to_number(to_char(end_date,'DD')) - to_number(to_char(start_date,'DD'))
    13         else
    14           (to_number(to_char(last_day(start_date),'DD'))-to_number(to_char(start_date,'DD')))+
    15           (to_number(to_char(end_date,'DD')))
    16         end as dys
    17* from t
    SQL> /
    START_DATE           END_DATE               MNTH_BET         YR       MNTH        DYS
    28-JUN-2012 00:00:00 31-JAN-2013 00:00:00 7.09677419          0          7          3
    29-FEB-2012 00:00:00 30-JUN-2012 00:00:00          4          0          4          1
    28-FEB-2010 00:00:00 30-JUN-2012 00:00:00         28          2          4          2
    29-FEB-2012 00:00:00 15-JUN-2012 00:00:00  3.5483871          0          3         15

  • How to remove the "0" from the sum cell when the other cells are empty?

    Hello!
    When I use the formula to sum the values from a few cells, there is a zero in the sum cell when the other cells are empty.
    My question concerns how to remove the 0 from the sum cell when the cells that will be summed are empty.
    Thank you!
    /Johan Strömbeck

    Hi,
    Please try the Mr. Laurence's suggestion first. Then, we may try the other workarounds.
    1) Go to Excel option> Advanced>Display Option for this worksheet> Uncheck Show a zero in cells that have zero value
    2) Go to Conditional Formatting>New Rule>Format only cells that contain> Value equal to 0> Format the color with white
    Hope it's helpful.
    Regards,
    George Zhao
    TechNet Community Support

  • How to get the Useru2019s position when the user doesnu2019t have CP relation

    We have a custom program which will add / delete attributes (In transaction PPOSA_BBP). It is working fine for users which were assigned with CP relation But it fails for users which doesnu2019t have CP relation (since we are getting the position of users form HRP1001 then we are retrieving the existing attributes based on the position after that updating the attributes) as we are getting the position from HRP1001 it fails for users were no CP relation.
    Help us how to get the Useru2019s position when the user doesnu2019t have CP relation. Suggest us any function module or how to query the HRP1001 or some other table if exists
    Regards
    Paul

    Hi Paul,
    Have a look at these tables.
    Using table BUT000 the central business partner data are stored, f.e. partner type, partner names, partner number, partner guid, person number, etc. In table BUTBKK the bank data to a business partner are stored.
    Central business partner address data
    The table ADRC is used for the address of a business partner. Table BUT020 links the business partner number with the address number. Using table BUT021 several addresses to a business partner with different usages (modes), f.e. correspondence or delivery address, can be stored. The personal data of a business partner person are stored with key person number in table ADRP. The person number is assignd to a business partner person in table BUT000. Communication data of business partners as e-mail, telephone, fax, etc. are stored in the tables ADDR1 u2013 ADDR12. The business address of a contact person or an employee consists of the organization address (company resp. org.-unit) and of an address addition, which describes f.e. a building, a room number, etc. The address addition is stored in table ADCP and is identified by the keys address number of the organization address and person number.
    Relationships between business partners
    Table BUT050 contains the relationships between a business partner organization and a business partner person using relation types. The relation types are defined in table TBZ9, f.e. the relation type u2018has employeeu2019 corresponds to identifier u2018BUR010u2019, the relation type u2018has contact personu2019 corresponds to identifier u2018BUR001u2019. Table BUT051 stores communication data of a contact person relationship (compare to table ADCP). Table BUT052 stores several address numbers to one business partner relationship (including a standard flag).
    Hope this helps,
    Kind Regards,
    Matthew

  • How to get Manager id automatically when Employee Id is given.

    How to get Manager id automatically when Employee Id is given.
    1) I created a simple BO with two elements namely
        1.Employee Id
        2.Manager id
    How to get employee's first name and last name?
    And how will i get manager id  automatic when i click employee id in element field.
    Anbu.

    Have you tried to use "APPS.FND_CONCURRENT" API?
    http://etrm.oracle.com/pls/trm11510/etrm_pnav.show_object?c_name=FND_CONCURRENT&c_owner=APPS&c_type=PACKAGE
    http://etrm.oracle.com/pls/trm11510/etrm_pnav.show_object?c_name=FND_CONCURRENT&c_owner=APPS&c_type=PACKAGE%20BODY
    Thanks,
    Hussein

  • How to get UTF-8 encoding when create XML using DBMS_XMLGEN and UTL_FILE ?

    How to get UTF-8 encoding when create XML using DBMS_XMLGEN and UTL_FILE ?
    Hi,
    I do generate XML-Files by using DBMS_XMLGEN with output by UTL_FILE
    but it seems, the xml-Datafile I get on end is not really UTF-8 encoding
    ( f.ex. cannot verifying it correct in xmlspy )
    my dbms is
    NLS_CHARACTERSET          = WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET     = AL16UTF16
    NLS_RDBMS_VERSION     = 10.2.0.1.0
    I do generate it in this matter :
    declare
    xmldoc CLOB;
    ctx number ;
    utl_file.file_type;
    begin
    -- generate fom xml-view :
    ctx := DBMS_XMLGEN.newContext('select xml from xml_View');
    DBMS_XMLGEN.setRowSetTag(ctx, null);
    DBMS_XMLGEN.setRowTag(ctx, null );
    DBMS_XMLGEN.SETCONVERTSPECIALCHARS(ctx,TRUE);
    -- create xml-file:
    xmldoc := DBMS_XMLGEN.getXML(ctx);
    -- put data to host-file:
    vblob_len := DBMS_LOB.getlength(xmldoc);
    DBMS_LOB.READ (xmldoc, vblob_len, 1, vBuffer);
    bHandle := utl_file.fopen(vPATH,vFileName,'W',32767);
    UTL_FILE.put_line(bHandle, vbuffer, FALSE);
    UTL_FILE.fclose(bHandle);
    end ;
    maybe while work UTL_FILE there is a change the encoding ?
    How can this solved ?
    Thank you
    Norbert
    Edited by: astramare on Feb 11, 2009 12:39 PM with database charsets

    Marco,
    I tryed to work with dbms_xslprocessor.clob2file,
    that works good,
    but what is in this matter with encoding UTF-8 ?
    in my understandig, the xmltyp created should be UTF8 (16),
    but when open the xml-file in xmlSpy as UTF-8,
    it is not well ( german caracter like Ä, Ö .. ):
    my dbms is
    NLS_CHARACTERSET = WE8MSWIN1252
    NLS_NCHAR_CHARACTERSET = AL16UTF16
    NLS_RDBMS_VERSION = 10.2.0.1.0
    -- test:
    create table nh_test ( s0 number, s1 varchar2(20) ) ;
    insert into nh_test (select 1,'hallo' from dual );
    insert into nh_test (select 2,'straße' from dual );
    insert into nh_test (select 3,'mäckie' from dual );
    insert into nh_test (select 4,'euro_€' from dual );
    commit;
    select * from nh_test ;
    S0     S1
    1     hallo
    1     hallo
    2     straße
    3     mäckie
    4     euro_€
    declare
    rc sys_refcursor;
    begin
    open rc FOR SELECT * FROM ( SELECT s0,s1 from nh_test );
    dbms_xslprocessor.clob2file( xmltype( rc ).getclobval( ) , 'XML_EXPORT_DIR','my_xml_file.xml');
    end;
    ( its the same when using output with DBMS_XMLDOM.WRITETOFILE )
    open in xmlSpy is:
    <?xml version="1.0"?>
    <ROWSET>
    <ROW>
    <S0>1</S0>
    <S1>hallo</S1>
    </ROW>
    <ROW>
    <S0>2</S0>
    <S1>straޥ</S1>
    </ROW>
    <ROW>
    <S0>3</S0>
    <S1>m㢫ie</S1>
    </ROW>
    <ROW>
    <S0>4</S0>
    <S1>euro_€</S1>
    </ROW>
    </ROWSET>
    regards
    Norbert

  • How to get those Char Description when i record please give a solution

    Hi Experts
    when i try to extend using BDC the meterial all data is getting copied to new plant but in MRP3 Configure varients is not getting copied in bdc i am getting all the values from parent plant but these values are not getting displayed in new plant for only *MRP3 Configure varients
    how to get those values please give a solution
    and
    when i am trying to make the BDC recording of creation of meterial in this process
    in MRP3 when i give configurable meterial  = Lamp  or CT or VOLTMETER and when
    i go for configurevariants button it's not displaying any Char Description  for the perticular meterial
    but in general when i creat a material process  there Char Description  are coming where i can give the values
    how to get those Char Description when i record please give a solution

    Hi Maen Anachronos
    i am Getting popup where i can give any value
    but in creation of meterial for a perticular config meterial there is will be 1 templete in which we will get some constant  Char Description where we'll have some options to give the value
    but when it 's done in BDC Recording  it's not displaying any values Char Description then how can we decide the values to what to give when Recording

  • How to get the search option when we are creating new view

    Hi,
    How to get the search functionality when we are creating new view.
    Ex:- if we see the standard component BT112S_SC. Under this
    AdvancedSP  is the view,
    same kind of view if i want to create new view with same bol entity in my new component. I am unable to get that search functionality.
    for search functionality,,i think view should inherit the super class CL_BTSRV_ADVS_CNTRL, but in my new view controller class, i am unable to find this class.
    Can anybody give me some inputs on this.
    Thanks,
    neelam

    In case you are still not able to proceed please refer the following blog.
    http://blogs.moovar.com/sap/sap-crm-web-ic-create-a-new-search-view-and-result-view
    Regards,
    Harshit

  • How to get on your ipad when it is disabled

    how to get on your ipad when it is disabled

    FORCE IPAD INTO RECOVERY MODE
    1. Hold Sleep/Wake button down and slide to turn off iPad
    2. Turn on computer and launch iTune (make sure you have the latest version of iTune)
    3. Plug USB cable into computer's USB port
    4. Hold Home button down and plug the other end of cable into docking port. Do not release button until you see picture of iTune and plug.
    5. Release Home button.
    ON COMPUTER
    6. iTune has detected iPad in recovery mode. You must restore this iPad before it can be used with iTune.
    7. Select "Restore iPad"...

  • Trying to make a Xmas Card in iPhoto. When card is made I hit "Buy Card", but I get "card incomplete" because it says there are empty photo templates that haven't been filled. Only they have all been filled. There are no empty ones left to fill! Now what?

    Trying to make a Xmas Card in iPhoto on my Mac i5. When card is made I hit "Buy Card", but I get "card incomplete" because it says there are empty photo templates that haven't been filled. Only I have filled them all!. There are no empty ones left to fill! Now what?
    Thanks for the help.

    Only I have filled them all!. There are no empty ones left to fill! Now what?
    Some text do look like they were final texts, that cannot be filled, but they are also place holders, for example the "Season's Greetings".Have you really clicked on each and every text, to see if they need filling in?

  • I keep getting an error code when I try to empty my trash (error code -8003)...any suggestions?

    I keep getting an error code when I try to empty my trash (error code -8003)...any suggestions?

    Trash It works if you're Mac Pro running under Mac OSX 10.6.8
    https://www.macupdate.com/app/mac/8214/trash-it
    Solving trash problems:
    http://www.thexlab.com/faqs/trash.html

  • Does anyone know how to get a imessage back when deleted

    does anyone know how to get a imessage back when deleted

    The only way is to restore from a backup that has the message you want.  If you do this you will lose anything since that backup.

  • I am getting error code 8003 when I try to empty my trash. Any help?

    I am getting error code 8003 when I try to empty my trash. Any help? This happen right after I tried to clear my backup HD.

    Greetings,
    If you dragged items from a TimeMachine backup drive to the trash then that is most likely the cause of the issue.  Do not move files from the TimeMachine backup into the trash (http://support.apple.com/kb/HT1427).
    If your backup drive only contains a timemachine backup then you will want to reformat that drive:
    http://support.apple.com/kb/TS1600
    Keep in mind that before you reformat the backup drive that you remove any files you wish to keep to your computer. 
    Cheers.

  • How to get iMessage to work when all it says is waiting for activation

    How to get iMessage to work when all it says is waiting for activation

    Hi Howell,
    Welcome to Apple Support Communities.
    This article on troubleshooting FaceTime activation has some steps you can try:
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/ts4268
    Have a great day,
    Jeremy

  • Office 2010 Don't print blank lines when data fields are empty

    How do you do this in office 2010?  Where do we go now?
    This used to be under the Tools menu in previous versions:
    On the Tools menu, click Mail Merge.
    In the Mail Merge Helper dialog box, click Merge.
    NOTE: You must select the main document and data source for the merge before doing step 2.
    In the Merge dialog box, under When Merging Records, click either:
    Don't print blank lines when data fields are empty.
    -or-
    Print blank lines when data fields are empty.
    Click Close in the Merge dialog box, and then click
    Close in the Mail Merge Helper.
    NOTE: If you made no changes in the Merge dialog box, the
    Close button is not available. Click Cancel instead.
    Back to the top

    Hi,
    In Word 2007 or Word 2010, you can add
    Mail Merge Helper to the Quick Access bar, and perform the steps then.
    To add the
    Mail Merge Helper command in the Quick Access Toolbar in Word 2007, follow these steps:
    a.                 
    In Word 2007, click the
    Microsoft Office Button, and then click Word Options >
    Customize.
    In Word 2010, click File > Options > Customize Ribbon.
    b.                 
    Click
    All Commands in the Choose commands from, and then click
    Mail Merger Helper in the Choose commands from list.
    c.                  
    Click
    Add, and then OK.
    Best Regards,
    Sally Tang

Maybe you are looking for

  • FCP X doesn't display iMovie clips correctly in Event Library

    I have 10 years of clips that are setup by year/date in iMovie. Although I had imported most of the media in 2009, iMovie seems smart enough to read the actual file metadata and find the media recording date, which is prior to the import date. As a r

  • Querying a Dropdown List

    I have a dropdown with populating code that looks like the following: myDropdownBox.DataSource = myDataSource; myDropdownBox.DisplayMmeber = "typeDescription"; myDropdownBox.DisplayValue = "typeId"; Assuming that I have a typeId with a value of, let'

  • Jni issue- urgentllly

    We have developed a *.dll that routes advapi32.dll functions to java code.My class uses j2sdk1.4.1_01 classes and also the same jre.When I try to execute this *.class using jre1.4.1_01 works fine,but when I try to execute the same class using jre 1.2

  • Can't set up email account!

    When I purchased my Curve 3g about a year ago, I setup my email account like normal and it worked fine over this past year. Recently I had to change my email password on the computer, and it caused my blackberry to no longer be able to send or receiv

  • Enable status bar ONLY on iPhone 5 where there is extra space?

    My app really needs as much screens space as it can get, execpt on iPhone 5 where there is a surplus of dead space. I need the status bar hidden on previous iPhones. Is there a way to make the status bar show on the iPhone 5 but not on others, so tha