#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 51
Default If cell is empty?

I have the following formula:
=IF((B31)=0,SUM(C30+B31),(SUM(C30+B31)))
How do I add the following to the formula:
If A31="",NA()
In other words, I want the formula to also look at cell A31 and if it is
empty then cell C31 to show NA or even show nothing.
--
WH99
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default If cell is empty?

Maybe...

=if(a31="",na(),if(b31=0,c30+b31,c30+b31))

Did you mean to do the same expression in your formula?

=if(a31="",na(),c30+b31)
seems to the same.

WH99 wrote:

I have the following formula:
=IF((B31)=0,SUM(C30+B31),(SUM(C30+B31)))
How do I add the following to the formula:
If A31="",NA()
In other words, I want the formula to also look at cell A31 and if it is
empty then cell C31 to show NA or even show nothing.
--
WH99


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,856
Default If cell is empty?

I'm not sure what your first formula is doing - you seem to be adding
C30 to B31 irrespective of the value of B31 (and if it were zero, then
it would not matter anyway) !! Should one of the terms be C30+B30 ?

Try this:

=IF(A31="","n/a",C30+B31)

if your first formula is correct, or this:

=IF(A31="","n/a",IF(B31=0,C30+B30,C30+B31))

if my suggestion is correct.

Hope this helps.

Pete

On Jun 27, 12:17*pm, WH99 wrote:
I have the following formula:
=IF((B31)=0,SUM(C30+B31),(SUM(C30+B31)))
How do I add the following to the formula:
If A31="",NA()
In other words, I want the formula to also look at cell A31 and if it is
empty then cell C31 to show NA or even show nothing.
--
WH99


  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 51
Default If cell is empty?

Thank all for your input.
I have used Daves formula, that works fine.....thank you Dave.
--
WH99


"Pete_UK" wrote:

I'm not sure what your first formula is doing - you seem to be adding
C30 to B31 irrespective of the value of B31 (and if it were zero, then
it would not matter anyway) !! Should one of the terms be C30+B30 ?

Try this:

=IF(A31="","n/a",C30+B31)

if your first formula is correct, or this:

=IF(A31="","n/a",IF(B31=0,C30+B30,C30+B31))

if my suggestion is correct.

Hope this helps.

Pete

On Jun 27, 12:17 pm, WH99 wrote:
I have the following formula:
=IF((B31)=0,SUM(C30+B31),(SUM(C30+B31)))
How do I add the following to the formula:
If A31="",NA()
In other words, I want the formula to also look at cell A31 and if it is
empty then cell C31 to show NA or even show nothing.
--
WH99





  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 51
Default If cell is empty?

Sorry I got carried away its not working quit right now!

This is mid table, it goes from the start of the month to the end.

A B C
07-Apr-08 03:30 11:30
08-Apr-08 01:50 13:20
09-Apr-08 02:45 16:05
10-Apr-08 00:00 16:05
11-Apr-08 02:00 18:05
12-Apr-08 03:15 21:20
13-Apr-08
14-Apr-08

Column "C" formula to add the previous days total to the next day total. But
If column "B" is zero then just to carry the days total (column "C") forward.
Also if there is no entry in column "B" then column "C" to show blank. as
per the table above.

--
WH99


"Pete_UK" wrote:

I'm not sure what your first formula is doing - you seem to be adding
C30 to B31 irrespective of the value of B31 (and if it were zero, then
it would not matter anyway) !! Should one of the terms be C30+B30 ?

Try this:

=IF(A31="","n/a",C30+B31)

if your first formula is correct, or this:

=IF(A31="","n/a",IF(B31=0,C30+B30,C30+B31))

if my suggestion is correct.

Hope this helps.

Pete

On Jun 27, 12:17 pm, WH99 wrote:
I have the following formula:
=IF((B31)=0,SUM(C30+B31),(SUM(C30+B31)))
How do I add the following to the formula:
If A31="",NA()
In other words, I want the formula to also look at cell A31 and if it is
empty then cell C31 to show NA or even show nothing.
--
WH99



  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 7
Default If cell is empty?

I would basically make your A31 condition the primary condition and then put
your original formula as the secondary condition.

=IF(A31="",NA(),IF(B31=0,SUM(C30+B31),SUM(C30+B31) ))

However I'd like you to look at your original formula again as it seems to
do the C30+B31 sum calculation regardless of the value of B31. So that part
is redundant. In other words, I'll simplify the new formula to the following
and still get the same result above:

=IF(A31="",NA(),SUM(C30+B31))

--
Rickster


"WH99" wrote:

I have the following formula:
=IF((B31)=0,SUM(C30+B31),(SUM(C30+B31)))
How do I add the following to the formula:
If A31="",NA()
In other words, I want the formula to also look at cell A31 and if it is
empty then cell C31 to show NA or even show nothing.
--
WH99

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 51
Default If cell is empty?

Thanks Rickster,
That works now.
--
WH99


"Rickster" wrote:

I would basically make your A31 condition the primary condition and then put
your original formula as the secondary condition.

=IF(A31="",NA(),IF(B31=0,SUM(C30+B31),SUM(C30+B31) ))

However I'd like you to look at your original formula again as it seems to
do the C30+B31 sum calculation regardless of the value of B31. So that part
is redundant. In other words, I'll simplify the new formula to the following
and still get the same result above:

=IF(A31="",NA(),SUM(C30+B31))

--
Rickster


"WH99" wrote:

I have the following formula:
=IF((B31)=0,SUM(C30+B31),(SUM(C30+B31)))
How do I add the following to the formula:
If A31="",NA()
In other words, I want the formula to also look at cell A31 and if it is
empty then cell C31 to show NA or even show nothing.
--
WH99

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
When is a cell empty and how do I empty it. C Brandt Excel Discussion (Misc queries) 5 August 13th 07 05:37 PM
format a cell with a formula so an empty reference cell shows blan M2 Excel Discussion (Misc queries) 3 November 7th 06 10:42 PM
Leaving an empty cell empty GRL Excel Discussion (Misc queries) 4 April 22nd 06 05:47 PM
why a reference to an empty cell is not considered empty Nicoscot Excel Discussion (Misc queries) 10 March 10th 06 05:36 AM
How do I leave formula cell blank if 2nd reference cell is empty? Liana S Excel Discussion (Misc queries) 2 October 21st 05 04:38 PM


All times are GMT +1. The time now is 07:11 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"