ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Return blank cell from conditional (https://www.excelbanter.com/excel-programming/391448-return-blank-cell-conditional.html)

adjustaburn

Return blank cell from conditional
 
Hello gurus,

I would love it if the following conditional statement could return a truly
blank cell:

=IF(A5=2,A17,BLANK)

Unfortunately it returns an error when A5<2.

I am trying to average only numbers that meet certain conditions and thus
replacing BLANK by zero throws off my results.
What would I put in in place of BLANK to get an empty ignorable cell out?


Rick Rothstein \(MVP - VB\)

Return blank cell from conditional
 
I would love it if the following conditional statement could return a
truly
blank cell:

=IF(A5=2,A17,BLANK)

Unfortunately it returns an error when A5<2.

I am trying to average only numbers that meet certain conditions and thus
replacing BLANK by zero throws off my results.
What would I put in in place of BLANK to get an empty ignorable cell out?


The empty string ""...

=IF(A5=2,A17,"")

Rick



All times are GMT +1. The time now is 01:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com