Counting years

1

1234

Hi,

I have in column A this code as result of calculating years, months
and days with dateif:

Column A

6 / 8 / 25
6 / 0 / 17
5 / 11 / 12
6 / 6 / 21
6 / 0 / 30
6 / 3 / 30
6 / 1 / 0
6 / 7 / 3
8 / 11 / 14
6 / 0 / 11
6 / 3 / 27
6 / 0 / 0
6 / 1 / 20

I want to count the number of cells that have 5 years. In this case
would be 1. The year is the first digit starting by the left.

Thanks!
 
D

Dave Peterson

Since those values look like text, you could try:

=countif(a1:a10,"5 /*")

Personally, I'd use separate columns for each of those years, months and days.
It can make life a lot simpler if you don't have to parse the data first.
 
1

1234

Hi, Dave

It worked pretty well. Thanks for your advise. I received the file
like that.

Thank you so much!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top