Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

show blank cell when adding non consecutive cells that are blank ("")

Posted on 2011-03-25
10
Medium Priority
?
282 Views
Last Modified: 2012-06-27
I have a table where I want to add some non consecutive cells. However, if all the cells are blank ("" due to the formulas in these cells), I want the result to be blank ("").
The only thing I've come up with so far is:
=IF((L4="")*(N4=""),"",SUM(L4,N4))
But, this will get a bit cumbersome when there are many cells to add up.

The only other thing I might be able to take advantage of, is the fact that adjacent cells will always be blank (""), although, they will not be summed. (in the above example, M4 and O4 would be blank if their counter parts, L4 and N4, are blank too, it's just I don't want them summed with L4 and N4.

thanks
0
Comment
Question by:avoorheis
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +2
10 Comments
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35217684
The SUM function ignores blank cells even if they are generated with formulas so that will not be an issue.

Using adjacent cells to determine whether or not a cell is blank is smart. I do it all the time to simplify formulas.

Kevin
0
 
LVL 39

Expert Comment

by:nutsch
ID: 35217717
If you want the result to show as "" instead of 0, you can use a custom format to that end, e.g. 0;-0;


Thomas
0
 

Author Comment

by:avoorheis
ID: 35218336
if I use the sum function and sum 2 cells that both = "", then the result is 0. If I sum 2 cells and one is 0 and one is "", then I want the result to be 0.
Maybe I'm stuck with my original thought?
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 35218357
You will get 0 in both cases just as you desire.

What is your question?

Kevin
0
 

Author Comment

by:avoorheis
ID: 35218359
oh, when I say that the cell = "", that from a formula, like =if(a<>b,"",a+c).
0
 
LVL 39

Accepted Solution

by:
nutsch earned 800 total points
ID: 35218385
You could use

=IF(COUNTIF(L4:O4,"")>2,"",SUM(L4,N4))

0
 
LVL 43

Assisted Solution

by:Saqib Husain, Syed
Saqib Husain, Syed earned 800 total points
ID: 35218490
Try this formula

=IF(COUNTIF(H2:H16,"")=ROWS(H2:H16),"",SUM(H2:H16))
0
 

Author Comment

by:avoorheis
ID: 35218491
I like that nutsch.
0
 
LVL 43

Assisted Solution

by:Saqib Husain, Syed
Saqib Husain, Syed earned 800 total points
ID: 35218522
or if the data is in a row then

=IF(COUNTIF(L4:N4,"")=COLUMNS(L4:N4),"",SUM(L4:N4))

0
 
LVL 1

Assisted Solution

by:Harper-IT
Harper-IT earned 400 total points
ID: 35218787
How about this formula:  =IF(AND(L4="",N4=""),"",SUM(L4,N4))
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
Access developers frequently have requirements to interact with Excel (import from or output to) in their applications.  You might be able to accomplish this with the TransferSpreadsheet and OutputTo methods, but in this series of articles I will di…
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question