ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Compare a column of substring with another column of strings and get count (https://www.excelbanter.com/excel-discussion-misc-queries/447420-compare-column-substring-another-column-strings-get-count.html)

Shanmu

Compare a column of substring with another column of strings and get count
 
Below is the scenario. I have 2 columns. Column A has some article Ids (IS123, IS1234, etc.). Column X has Solutions provided to customer, where this article Id would be a reference (substring.)

I need the to compare each article Id (column A) with all solutions provided (Column X) and get the count of occurrences of each article Id in Column B.

Please Help!!

-Shanmu

GS[_2_]

Compare a column of substring with another column of strings and get count
 
Shanmu has brought this to us :
Below is the scenario. I have 2 columns. Column A has some article Ids
(IS123, IS1234, etc.). Column X has Solutions provided to customer,
where this article Id would be a reference (substring.)

I need the to compare each article Id (column A) with all solutions
provided (Column X) and get the count of occurrences of each article Id
in Column B.

Please Help!!

-Shanmu


The COUNTIF() function is what you need, and usage can be found under
the Function Reference in online help.

--
Garry

Free usenet access at http://www.eternal-september.org
ClassicVB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion



jack_n_bub

Quote:

Originally Posted by Shanmu (Post 1606489)
Below is the scenario. I have 2 columns. Column A has some article Ids (IS123, IS1234, etc.). Column X has Solutions provided to customer, where this article Id would be a reference (substring.)

I need the to compare each article Id (column A) with all solutions provided (Column X) and get the count of occurrences of each article Id in Column B.

Please Help!!

-Shanmu

Hi,

Try this...

=COUNTIF(B2:B4,"*"&A2&"*")

As per your scenario the ID is in cell A2 and the searched text is in the B2:B4 range. You may change references as per your use.

Let me know if it works.

Thanks,
Prashant

Shanmu

Quote:

Originally Posted by jack_n_bub (Post 1606514)
Hi,

Try this...

=COUNTIF(B2:B4,"*"&A2&"*")

As per your scenario the ID is in cell A2 and the searched text is in the B2:B4 range. You may change references as per your use.

Let me know if it works.

Thanks,
Prashant


Excellent Prashant... It works. Thanks :)


All times are GMT +1. The time now is 06:56 AM.

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