Quantcast
Channel: VBA IF statement with multiple conditions - Stack Overflow
Browsing latest articles
Browse All 3 View Live

Answer by pheeper for VBA IF statement with multiple conditions

You could use Select Case. It would look something like this...Sub test() Select Case i Case 1, 3, 7, 9, 10, 15, 16, 17, 18, 19, 20'do something End SelectEnd Sub

View Article



Answer by Scott Craner for VBA IF statement with multiple conditions

You can use select case:Select Case i Case 1,3,7,9,10, 15 to 20'Do sth.End Select

View Article

VBA IF statement with multiple conditions

I have got an IF statement that looks like that:If i=1 or i=3 or i=7 or i=9 or i=10 or i>=15 and i<=20 then'Do sth.End IfMy question is: Can I make these conditions easier (can I summarize...

View Article
Browsing latest articles
Browse All 3 View Live




Latest Images