ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   =COUNTIF (https://www.excelbanter.com/excel-discussion-misc-queries/146463-%3Dcountif.html)

Fiona

=COUNTIF
 

Hi
Is this formula limited to certain text types? I'm trying to get it to
search for example, coloumn B:B which contains references such as ABC-1234
against A1 which contains just 1234.
=COUNTIF(B:B,"*" & A1 & "*")
I cannot get it to work. If it has just the number only iy works fine.

Toppers

=COUNTIF
 
It works fine for me BUT if A1 (defined as TEXT) has "1234 " i.e. a trailing
blank, I get 0 for "ABCD-1234".

A1 formatted as number is O.K.

When you say it doesn't work, do you get 0 as a result?

"Fiona" wrote:


Hi
Is this formula limited to certain text types? I'm trying to get it to
search for example, coloumn B:B which contains references such as ABC-1234
against A1 which contains just 1234.
=COUNTIF(B:B,"*" & A1 & "*")
I cannot get it to work. If it has just the number only iy works fine.



All times are GMT +1. The time now is 12:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com