Earliest date in a row that may contain 1/0/1900 (zero)

KeithM

New Member
Joined
Feb 3, 2014
Messages
3
I've read the other posts about finding the earliest date in a row.
However, in my case, I have 20 columns of dates in the row.
The first column does not necessarily contain the earliest date.
Once there is no legitimate date for a column, the remaining columns
are filled with 1/0/1900 (zero).
Using =MIN(range) always produces 0.

Example of data:
9/9/20049/14/20049/8/20041/0/19001/0/1900

<tbody>
</tbody>

Your assistance is greatly appreciated.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
"=MIN(range) always produces 0."

That will only be true when there is a date of 0 - Are you looking for minimum nonzero date?

If so you can try:

=SMALL(A1:D100,COUNTIF($A$1:$D$100,0)+1)

This expression counts all the 0s in a range and returns the smallest number that is not a zero.

Cheers, :)
 
Upvote 0
Or, usin the actual cell entries.
You will need to fit this to your worksheet range.
Code:
=SMALL(A2:A6,COUNTIF(A2:A6, "1/1/1900")+1)
 
Upvote 0
Dear Shawnhet,
OUTSTANDING!
I need to look at this formula closer to figure out what it's doing - first time I've ever seen the "SMALL" command.
Worked perfectly.
Thank you again.
You made my day!
 
Upvote 0
No worries. Glad it worked out for you and thanks for the feedback.

Just FYI, the SMALL command searches through a range and finds a number that is some number away from the smallest

The countif portion I inserted then counted all the zeros and added 1, ie so if there are 10 zeros in your range the small command will return the eleventh smallest number in your range.

Cheers, :)
 
Upvote 0

Forum statistics

Threads
1,215,427
Messages
6,124,830
Members
449,190
Latest member
rscraig11

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top