I am creating this spreadsheet and I need help writing an Excel formula. I have a spreadsheet where values can be entered. I need to write a formula that says that if no values have been entered in a particular column (i.e. the cells are blank), then a particular cell (G30 for example) needs to read "NA." If a value has been entered (including a value of 0), then G30 needs to show the summation of the values in A30 divided by the summation of the values in B30. Thanks in advance.
That is a tough one. It would have to be an IF statement, but I don't know how to enter a range as blank. It would be something like: =IF(A2="",G30="NA",A30/B30) Basically it is saying IF A2 is blank, THEN "NA", ELSE A30/B30 But I don't know how to get a range of values as the first argument. Sorry I couldn't be anymore help.
=IF(A2="","NA",(SUM(A2:A30)/SUM(B2:B30))) So this formula would be written in cell G30, based on your example. The only thing that may be different is instead of A2 you will use some other cell. Give tulexan most of the credit, I only tweaked the formula a bit. Pugs