Formula help again, Please

  • Thread starter Thread starter Codeman
  • Start date Start date
C

Codeman

Cell F13’s formula is: =SUM(ROUNDUP(B6/F9,0))
Cell B6 and Cell F9 are cells that I have to provide information in if they
are applicable. Sometimes these cells do not require information to be
filled in, which results in Cell F13 to read, #VALUE.

I would like Cell F13 to have 0 or N/A when there is no need for information
in Cells B6 & F9. However, I do want Cell F13 to produce a number when
numbers are provided in Cells B6 & F9.

Can anyone provide me with the formula to achieve the above?
 
First of all let's drop the SUM; it is not needed. We could use just
ROUNDUP(B6/F9,0)

I will assume you want the math to be done only when there is a number in
both cells
=IF(COUNT(B6,F9)=2, ROUNDUP(B6/F9,0), NA())

or you might try

=IF(ISERROR(B6/F9)), NA(), ROUNDUP(B6/F9,0))

OR
=IF(ISERROR(B6/F9)), "", ROUNDUP(B6/F9,0))
the pair of double-quotes means show as if the cell were blank

An error occurs only when F9 is blank (treated as zero) or an actual zero so
you could use
=IF(F9=0, NA(), ROUNDUP(B6/F9,0))

best wishes
 
Try whichever you'd like:

For 0:

=IF(COUNT(B6,F9)<2,0,ROUNDUP(B6/F9,0))

For N/A:

=IF(COUNT(B6,F9)<2,"N/A",ROUNDUP(B6/F9,0))
 
Thank you all for your assistance. I used T. Valko recommendation.
I will have some other questions soon. I am almost finished with the work
and I have ran into a more complicated area that I will post later.

Thanks again to all.
 
Back
Top