hello, i have a range of cells that get filled with the letters "W", "L", "O", and "T" from a series of macros. what i am wondering if there is a simple way to analyze the string, and depending on which letter is last, count how many of that letter are in a row at the end of the string.
examples: string "W" desired outcome "1" as there is only the one character
string "LOOTWW" desired outcome "2" as the last two characters are the same
string "WWWLWWWWWW" desired outcome "6" as the last six characters are the same
i have the following code that does the trick, however i was wondering if there was a simpler way to achieve this as it is quite long and bulky.
the whole code includes the same for the other characters
thanks to anyone who has any suggestions
*well i was just about to post this and then i thought maybe a for loop would work and quickly started tinkering and came up with something nice and simple that seems to work, but i will post anyways in case someone could find it useful
:D
Bookmarks