Help with formula

R

Richard

Is there a way to count how many days a specific number
has been entered. Example:
Column A Column B
Part Number Date
12345 3-Oct-4
12345 3-Oct-4
99999 3-Oct-4
12345 7-Oct-4
99999 8-Oct-4
For part number 12345 answer would be from todays date to
7-Oct-4
 
M

Myrna Larson

Hi, Jason:

With the data he showed, do you suppose he wants to count Oct 3 twice? If not,
COUNTIF won't fill the bill.

I'm not sure *what* he wants. He talks about "from today's date to Oct 7". I
don't know what that has to do with it. Does he want the earliest data that's
= today and the latest date?

Myrna Larson
 
M

Myrna Larson

This array formula may work:

=MAX(IF(A1:A5=12345,B1:B5))-MIN(IF(A1:A5=12345,B1:B5,100000))+1

Enter this with CTRL+SHIFT+ENTER.

100000 represents a date sometime in the year 2173. I hope that's high enough.
Or, instead of the literal, you could substitute something like TODAY()+1000,
which would be ~3 years into the future.
 
Top