Quantcast
Channel: Instr condition doesn't work with 2 or more conditions - Stack Overflow
Browsing index pages (5 articles)
↧

Instr condition doesn't work with 2 or more conditions

I have the following INSTR condition in Excel VBA which doesn't work (all the time)STR_TEXT="SKU1234 $100/10' $200/20'"'< example stringIF INSTR(STR_TEXT,"/10'") AND INSTR(STR_TEXT,"/20'") THEN'...

View Article


Answer by xQbert for Instr condition doesn't work with 2 or more conditions

EXMAPLE: if instr(str_Text,"/10'") > 0 AND instr(str_text,"/20'") > 0 thenWhat Tim is saying is that the instr function returns the position in the string of the first instance of the string...

View Article


Answer by Tim Williams for Instr condition doesn't work with 2 or more...

Instr() return a numeric result: if it's >0 then the tested string contains the string being searched for.Sub Test() Dim str_text As String str_text = "SKU1234 $100/10' $200/20'"'< example string...

View Article

Answer by jtolle for Instr condition doesn't work with 2 or more conditions

The other answers point out the most important thing, which is that InStr actually returns the numeric position of one string in another (or 0 if the desired string isn't found). As they say, you...

View Article

Answer by Vaishali for Instr condition doesn't work with 2 or more conditions

The INSTR function will return the index of the sub-string you are trying to find in a string. So the following will give a numeric value instead of a boolean value: INSTR(STR_TEXT,"/10'")To fix this,...

View Article

Browsing index pages (5 articles)


Latest Images