ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Excel VBA Test For Blank Cell (https://www.excelbanter.com/excel-programming/305358-excel-vba-test-blank-cell.html)

tod

Excel VBA Test For Blank Cell
 
Try this:

'If the length of the value in named range CNT is not zero
(there's something in it), do the deed. Otherwise do
nothing.
If Len(Range("CNT")) < 0 Then
Range("CNT").Offset(0, 5).Select
End If

-----Original Message-----
I'm new to this forum and believe I should have made my

initial post here, rather than under Applications.

I have a cell named, CNT. The possibility exists this

cell may contain either a label or a value. This cell
needs to be tested to determine whether it is a blank
cell. I
would like to use the ISBLANK function. Below are my

partially correct macro lines for doing this. I do not
know how to write the "if, then" procedure (portion)
correctly.

Range("CNT").Select
If isblank(CNT) Then '<-- This is the line I need help to

write correctly.
Selection.Offset (0, 5).Select

Thank you very much.
--
Rodney Getschman
Wisconsin VFW
.



All times are GMT +1. The time now is 07:33 PM.

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