Thread: strings
View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
RobcPettit[_2_] RobcPettit[_2_] is offline
external usenet poster
 
Posts: 108
Default strings

Hi Im trying to ask questions of a string. My string is in "A1". I
assign it to 'teststring' which looks like "A 2 3 A 4" This can be
any combination with or without A or Numbers and contain 3 values upto
5. Id like to ask this of my string.
Does it contain "A", If yes How many....if more than 1 then....how many
values in string altogether.....if 3 go do something if three add the
numbers up in the string and use the A's as 1 eg 'A A 2 3 4' = 11.

Does it contain A, if no add al the values.

I could do with knowing the position of the A's but that a minor prob.
When I was doing this with 2 values I used If InStr("A", TestString)
0, as advised prev and this was great.
Hope this makes sense.
Regards Robert