Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]() |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
When is a cell empty and how do I empty it. | Excel Discussion (Misc queries) | |||
format a cell with a formula so an empty reference cell shows blan | Excel Discussion (Misc queries) | |||
Leaving an empty cell empty | Excel Discussion (Misc queries) | |||
why a reference to an empty cell is not considered empty | Excel Discussion (Misc queries) | |||
How do I leave formula cell blank if 2nd reference cell is empty? | Excel Discussion (Misc queries) |