ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Checking activecell value for NA (https://www.excelbanter.com/excel-programming/368164-checking-activecell-value-na.html)

Barb Reinhardt

Checking activecell value for NA
 
I have this IF then statement:

If ActiveCell.text = "RED" Or ActiveCell.text = "GREEN" Or ActiveCell.text =
"YELLOW" Or ActiveCell.text = "DONE" Then

....
END IF

What do I need to add to have it work if the activecell value is N/A?

Thanks,
Barb Reinhardt

Dave Peterson

Checking activecell value for NA
 
if activecell.text = "#N/A"



Barb Reinhardt wrote:

I have this IF then statement:

If ActiveCell.text = "RED" Or ActiveCell.text = "GREEN" Or ActiveCell.text =
"YELLOW" Or ActiveCell.text = "DONE" Then

...
END IF

What do I need to add to have it work if the activecell value is N/A?

Thanks,
Barb Reinhardt


--

Dave Peterson

Bob Phillips

Checking activecell value for NA
 
If application.isna(activecell.Value) Then

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)

"Barb Reinhardt" wrote in message
...
I have this IF then statement:

If ActiveCell.text = "RED" Or ActiveCell.text = "GREEN" Or ActiveCell.text

=
"YELLOW" Or ActiveCell.text = "DONE" Then

...
END IF

What do I need to add to have it work if the activecell value is N/A?

Thanks,
Barb Reinhardt





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

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