Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cell is empty but IsEmpty is not working

I am writing an IF statement that uses the IsEmpty function to determine if True or False. I tried it both on a cell with a value (e.g., PRB2039) and on a blank cell to test my code, and the result is the same.

I removed formatting, and tried it on a new worksheet. I don't know what I'm doing wrong.

like image 334
Cecilia Moneta Avatar asked Dec 26 '22 19:12

Cecilia Moneta


1 Answers

I prefer using

If Len(Trim(Cells(i, 1).Value))=0 Then Msgbox "Empty"
like image 83
Siddharth Rout Avatar answered Jan 31 '23 12:01

Siddharth Rout