excel - Nesting "and" statements with "or" statements -


this line of code gives me: error 13: type mismatch how combine "nd" statent in "or"? ex: if or b or c or (d , e) or (f , g)

here code

if (cell.value) = "ftv1" _          or (cell.value) = "ftv2" _          or (cell.value) = "ftv3" _          or (cell.value) = "ftv4" _          or (cell.value) = "ftv5" _          or (cell.value) = "istcr" _          or (cell.value) = "cast" _          or (cell.value) = "rig" _          or (cell.value) > 50000 , (cell.value) < 52000 _          or (cell.value) > 55000 , (cell.value) < 56000 

thanks in advance

enclose compound statements in brackets explain compiler how order logical statments...

try this:

if (cell.value) = "ftv1" _          or (cell.value) = "ftv2" _          or (cell.value) = "ftv3" _          or (cell.value) = "ftv4" _          or (cell.value) = "ftv5" _          or (cell.value) = "istcr" _          or (cell.value) = "cast" _          or (cell.value) = "rig" _          or ((cell.value) > 50000 , (cell.value) < 52000) _          or ((cell.value) > 55000 , (cell.value) < 56000) 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -