ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   check the name of a cell (https://www.excelbanter.com/excel-programming/372473-check-name-cell.html)

Kevin

check the name of a cell
 
Im trying to check the cell below the active cell to see if it has a name or
not.
I tried
If ActiveCell.offset(1, 0).Name.Name = "" Then
but it doent like that. Any suggestions?

PS sorry if this posts twice, Im not sure if it went through the first time.

Jim Rech

check the name of a cell
 
If the cell in question does not have a name you get an error. So you have
to trap that error using On Error.

--
Jim
"Kevin" wrote in message
...
| Im trying to check the cell below the active cell to see if it has a name
or
| not.
| I tried
| If ActiveCell.offset(1, 0).Name.Name = "" Then
| but it doent like that. Any suggestions?
|
| PS sorry if this posts twice, Im not sure if it went through the first
time.



Kevin

check the name of a cell
 
hmm, cool I can work with that. I did this...
If ActiveCell.offset(1, 0).Name.Name < "" Then

Thanks a bunch for the help, this forum is great!

"Jim Rech" wrote:

If the cell in question does not have a name you get an error. So you have
to trap that error using On Error.

--
Jim
"Kevin" wrote in message
...
| Im trying to check the cell below the active cell to see if it has a name
or
| not.
| I tried
| If ActiveCell.offset(1, 0).Name.Name = "" Then
| but it doent like that. Any suggestions?
|
| PS sorry if this posts twice, Im not sure if it went through the first
time.





All times are GMT +1. The time now is 10:45 PM.

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