Forum Discussion
fvanhaelst
Jan 30, 2025Copper Contributor
Asterisk doesn't represent any random character
Hi all,
I want to count all cells that start with '50' (see A7) in sheet Test scenarios_UR, column C. Result should be 9, and not 1.
According the documentation, the asterisk symbol represents any random characters. However, only when an asterisk symbol is typed in the cell, it's counted (see cell C6).
What do I wrong?
THanks for the help!
Kr,
F
2 Replies
- Patrick2788Silver Contributor
Keep your data as is and use REGEXTEST:
=SUM(--REGEXTEST(A1:A10,"^50"))The "^50" is regex's way of checking for 50 at the start of the string.
- Detlef_LewinSilver Contributor
The * only works in the context of (datatype) text. The formula only picks up the value in C6.
Either you change your criteria to numbers or the data to text.