![]() |
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 |
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 |
If cell is empty?
try
=if(len(trim(a31))<1,"","not empty") -- Don Guillett Microsoft MVP Excel SalesAid Software "WH99" wrote in message ... 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 |
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 |
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 |
If cell is empty?
|
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 |
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 |
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 |
All times are GMT +1. The time now is 09:03 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com