ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Identify blanks (https://www.excelbanter.com/excel-programming/404013-identify-blanks.html)

JJM

Identify blanks
 
I have multiple cells (C5,D7,R45,S77,T79...) that should contain data input
by user.
I need to identify those cells where no data was entered to alert the user.
Can someone give me an idea of how to write this code?
Thanks.
--
Regards,

Gary''s Student

Identify blanks
 
Perhaps:

Sub dural()
ll = Array("C5", "D7", "R45", "S77", "T79")
For i = 0 To 4
If IsEmpty(Range(ll(i))) Then
MsgBox ("cell " & Range(ll(i)).Address & " needs to be filled")
End If
Next
End Sub

Alternatively you can construct a range of dis-joint cells and loop over it.
--
Gary''s Student - gsnu200764


"JJM" wrote:

I have multiple cells (C5,D7,R45,S77,T79...) that should contain data input
by user.
I need to identify those cells where no data was entered to alert the user.
Can someone give me an idea of how to write this code?
Thanks.
--
Regards,


JJM

Identify blanks
 
Great! Thanks!
--
Regards,


"Gary''s Student" wrote:

Perhaps:

Sub dural()
ll = Array("C5", "D7", "R45", "S77", "T79")
For i = 0 To 4
If IsEmpty(Range(ll(i))) Then
MsgBox ("cell " & Range(ll(i)).Address & " needs to be filled")
End If
Next
End Sub

Alternatively you can construct a range of dis-joint cells and loop over it.
--
Gary''s Student - gsnu200764


"JJM" wrote:

I have multiple cells (C5,D7,R45,S77,T79...) that should contain data input
by user.
I need to identify those cells where no data was entered to alert the user.
Can someone give me an idea of how to write this code?
Thanks.
--
Regards,



All times are GMT +1. The time now is 04:54 PM.

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