Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Case select returning error when cell contains #N/A : how must i avoid this error

Title says it all

Thanks,

Luc
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,494
Default Case select returning error when cell contains #N/A : how must i avoid this error

maybe this will do what you want

Sub test()
If Not IsError(Range("C1").Value) Then
Select Case Range("C1").Value
Case 1
MsgBox "1"
Case 2
MsgBox "2"
End Select
End If
End Sub

--


Gary Keramidas
Excel 2003


"Luc" wrote in message
...
Title says it all

Thanks,

Luc


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Case select returning error when cell contains #N/A : how must i avoid this error

Thanks for your help !!!!!

Luc

"Gary Keramidas" <GKeramidasAtMSN.com schreef in bericht
...
maybe this will do what you want

Sub test()
If Not IsError(Range("C1").Value) Then
Select Case Range("C1").Value
Case 1
MsgBox "1"
Case 2
MsgBox "2"
End Select
End If
End Sub

--


Gary Keramidas
Excel 2003


"Luc" wrote in message
...
Title says it all

Thanks,

Luc


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
use of Case-Select, with on error Steve Excel Programming 1 May 13th 09 04:52 PM
Case without Select Case error problem Ayo Excel Discussion (Misc queries) 2 May 16th 08 03:48 PM
Syntax Error ?. Execution does not enter the Select Case u473 Excel Programming 2 December 11th 07 04:56 PM
select case error ezil Excel Programming 0 July 14th 07 08:38 PM
Hopefully simple Select Case error Kobayashi[_15_] Excel Programming 3 October 3rd 03 07:46 PM


All times are GMT +1. The time now is 07:48 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"