0

I am using this formula.

=COUNTIFS(EXCEL_TAB!$A$1:$A$999999", "*"&"#_CELL_VALUE"&"*"). 

How can I specify that that for #_CELL_VALUE, this can be any number followed by _CELL_VALUE? The reason is because the data has the values S_CELL_VALUE (the letter S) and #_CELL_VALUE (# is any number). So I need to differentiate them.

Sample Data
RS_CELL_VALUE, 11_CELL_VALUE
RS_CELL_VALUE
11_CELL_VALUE
12_CELL_VALUE
13_CELL_VALUE, RS_CELL_VALUE

Attempt code

=COUNTA(REGEXMATCH(Data!A1:A999999, "*[0-9]_CELL_VALUE*"))
devcoder112
  • 141
  • 4
  • 11
  • 1
    `COUNTIFS` wildcard handling is not that flexible. It doesn't support `#`. You tagged with `regex`. That can be done with a VBA UDF. Is that an option for you? – chris neilsen Oct 21 '20 at 20:02
  • I just realized that. I think I need to go with COUNTA and Regex. – devcoder112 Oct 21 '20 at 20:03
  • Yes, how do I use VBA UDF to do this? I was thinking about using COUNTA and Regex – devcoder112 Oct 21 '20 at 20:06
  • I am going to use this: https://stackoverflow.com/questions/22542834/how-to-use-regular-expressions-regex-in-microsoft-excel-both-in-cell-and-loops. Loop Through Range – devcoder112 Oct 21 '20 at 20:30

0 Answers0