arrays - Taking last word of an string, variable not declared? -


i taking cell value (sometimes "flores", "de las flores"), cannot know value since there 10000+ records.

what want take "flores" (the last word, , if there one, then, one). ive tried using split , ubound, "not declared" error. trying make implicit.

function checkfirstletter(mystring, text, indexcurp, index) boolean             dim outstr, asciinum, vocal string, long ---->            arr = split(mystring, " ") ---->            vocal = arr(ubound(ary))             outstr = lcase(mid(text, indexcurp, 1))             asciinum = lcase(mid(mystring, 1, 1))             cells(index, "m") = vocal             cells(index, "o") = asciinum             if (asciinum = outstr)                 checkfirstletter = true                 else: checkfirstletter = false                 end if end function 

thanks!

i believe overly complicating anyway. unless i'm reading wrong (very possible) can simplify lot.

function checkfirstletter(mystring, text, indexcurp, index) boolean     dim vocal() string      vocal = split(mystring, " ")      cells(index, "m") = vocal(ubound(vocal))     cells(index, "o") = lcase(mid(mystring, 1, 1))      checkfirstletter = cells(index, "o") = lcase(mid(text, indexcurp, 1))  end function 

Comments

Popular posts from this blog

c# - Update a combobox from a presenter (MVP) -

How to understand 2 main() functions after using uftrace to profile the C++ program? -

How to put a lock and transaction on table using spring 4 or above using jdbcTemplate and annotations like @Transactional? -