ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   An empty cell = An empty cell ??? (https://www.excelbanter.com/excel-programming/398622-empty-cell-%3D-empty-cell.html)

amirstal[_2_]

An empty cell = An empty cell ???
 
When I use two empty cells, excel treats them as if they contain the
same, equal data. So, for example, if both A1 and A2 are empty, the
following formula will return "1": IF(A1=A2,"1").

But I don't want excel to treat those two cells as being equal as long
as they don't really contain any data. So in this case, the above
formula will not return the number "1".
How can I do it?

Thanks,

Amir


Bill Renaud

An empty cell = An empty cell ???
 
Use the IsBlank() worksheet function somewhere in your formula to check
both cells first.

--
Regards,
Bill Renaud




Dave Peterson

An empty cell = An empty cell ???
 
Maybe...

=if(and(a1=a2,a1<""),1,0)




amirstal wrote:

When I use two empty cells, excel treats them as if they contain the
same, equal data. So, for example, if both A1 and A2 are empty, the
following formula will return "1": IF(A1=A2,"1").

But I don't want excel to treat those two cells as being equal as long
as they don't really contain any data. So in this case, the above
formula will not return the number "1".
How can I do it?

Thanks,

Amir


--

Dave Peterson


All times are GMT +1. The time now is 08:08 AM.

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