aurelius89
Board Regular
- Joined
- Mar 15, 2017
- Messages
- 69
Can I MATCH a single character that may or may not be the only character in the cell?
For example,
Cell BA10 = B
Cell BC10 = B
Cell BC11 = Bldkfhghj
Cell BC12 = FGB
Cells B10:B12 could be in any order and their content could be random as well.
In this case, this would return the value of 1, as expected. However, cell BC10 (Or any other cell in the range) could be B and a space, like this "B "
The formula now returns #NA as it doesn't find it.
Will not work as it will find "Bldkfhghj" as the first result if "Bldkfhghj" was this was before "B"
Will not work as anything with B in it will be found
Will not work as it will find "FGB"
I am not sure how I can return the correct output here.
The "B" will either be on it's own or followed by a special character, never another letter.
This makes me think of something involving MID(cell ref,2,1)=CHAR(32) OR if MID(cell ref,2,1) is not between CHAR 65 and 90, or something to that effect might be involved.
Any ideas?
A different/better way of searching and returning a result is welcome, even if it's not a direct solution to this and it's something I can go on.
For example,
Code:
=MATCH(BA10,BC10:BC12,0)
Cell BA10 = B
Cell BC10 = B
Cell BC11 = Bldkfhghj
Cell BC12 = FGB
Cells B10:B12 could be in any order and their content could be random as well.
In this case, this would return the value of 1, as expected. However, cell BC10 (Or any other cell in the range) could be B and a space, like this "B "
The formula now returns #NA as it doesn't find it.
Code:
=MATCH(BA10&"*",BC10:BC12,0)
Code:
=MATCH("*"&BA10&"*",BC10:BC12,0)
Code:
=MATCH("*"&BA10,BC10:BC12,0)
I am not sure how I can return the correct output here.
The "B" will either be on it's own or followed by a special character, never another letter.
This makes me think of something involving MID(cell ref,2,1)=CHAR(32) OR if MID(cell ref,2,1) is not between CHAR 65 and 90, or something to that effect might be involved.
Any ideas?
A different/better way of searching and returning a result is welcome, even if it's not a direct solution to this and it's something I can go on.
Last edited: