Question with Simple Formula

Chris311

New Member
Joined
Jan 1, 2012
Messages
3
I am trying to set up a couple of basic formulas to track changes. The B column will have the current number each day, the D column should track daily change (B2-B3 is what D3 lists) and the E column tracks cumulative change (referring to B2 as the starting point).

I've set it up so that it works up to the point I've inputed data in the B column. However, going down, B3 is blank so the formula lists change in D3 as the number in B2 (I assume it's treating the blank in B3 as 0, then displaying B2-0). I would like it to display that as N/A.

Currently, I have =IF(B2-B3>0,SUM(B2-B3), "N/A") as the formula for column D. How should I modify that so that if the cell in column B is blank, it lists the result as "N/A" instead of treating it as 0?

Thanks,

Chris
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Thanks for the fast response. Works fine if there is info in the B column (shows the change), but in the D column it's listing "#N/A" instead of "N/A" if the B cell is blank.

Any idea what the # is from? Thanks and sorry for my ignorance on this.
 
Upvote 0
Thanks for the fast response. Works fine if there is info in the B column (shows the change), but in the D column it's listing "#N/A" instead of "N/A" if the B cell is blank.

Any idea what the # is from? Thanks and sorry for my ignorance on this.


Just replace NA() with "N/A" - note that that will give you a text value, not an Excel error value #N/A.
 
Upvote 0
Thanks, that seems to do it. If you don't mind explaining even more to me (as I try to learn to set up formulas beyond basic math), why is the "N/A" last? I'm not following the logic of the (AND(B3<>"",B2-B3>0) section. Is there a good reference on formulas for idiots I should look at?

Thanks again.
 
Upvote 0
AND(B3<>"",B2-B3>0 is saying if both the following are true

B3 is not blank
B2-B3 is greater than 0

then apply the formula, else return N/A.

The general syntax of an IF statement is

=IF(X, return Y, return Z)
 
Upvote 0

Forum statistics

Threads
1,223,904
Messages
6,175,295
Members
452,631
Latest member
a_potato

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top