ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   select case error (https://www.excelbanter.com/excel-programming/393354-select-case-error.html)

ezil

select case error
 
To evaluate multiple conditions i am using select case statement. But it
gives error
message if the cell contains "#n/a" value. It is not evaluating else
condition. In the below example the cell (a,2) value changes to 20 if the
curcell value = #n/a
How to achieve this? and also how to use multiple conditions in the below
statement for eg. case is 50 and less than 60

Select Case curcell.Value
Case Is 50
Cells(a, 2) = 10
Case Else
Cells(a, 2) = 20
End Select


All times are GMT +1. The time now is 12:09 AM.

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