Formula help

I need a formula to count the number of rows in column B that correlate with the text in column A. So in the below example, I need Column C to return a value of 3.

Column A Column B
Hospital 01
02
03

data example

More info

Hello,

Could you provide a clearer example into what is in column b for each row? It is hard to tell.

The best help I could give you with this info is to use Countifs:

COUNTIFS(criteria_range1, criteria1, [criteria_range2, criteria2]…)

Example - Counts the number of times the value of B1 appears in column A:

Countifs(A:A,B1)

I would be happy to provide more help if you can provide another example on what you are looking at.

Thanks,

-Max

Hi I attached an example to

Hi
I attached an example to my original post. I appreciate your help.

Thanks

Hello, I'm still not sure

Hello,

I'm still not sure that I understand what you are asking. Do you want column C to be populated with column B's number if there is text in column A? If so use this formula in C2 and copy it down:

Let me know if I am looking at this wrong.

Sincerely,

Max

Correction

Whoops,

Change the second occurrence of "A2" to "B2" in my previous post if you want it to show the DRGinstead of the DRG Desc.