Condition to find oldest date

Scotto811

New Member
Joined
Apr 8, 2011
Messages
11
Hey everyone, I'm programming a spread sheet and I'm looking for the oldest date in a column with this command; =SMALL(E10:E4000,1)

It's working very nicely, but I want to only find the oldest date if the comulmn next to it is blank. The column next to it is a closed issue date, so if there is no date the issue is open. I was hoping to use the if command to have excel look at the cell next to it, if it has a date then move down to the next until it finds a blank (therefore open) cell and list that as the oldest date.

Attached a screen shot for reference. in the screen shot it would stop on the red box and provide that date 4/7/2010 because the closed issue box is empty next to it.



Uploaded with ImageShack.us

I'm using Cell 10:4000 because the number of rows changes but never goes over 4000, I also have the top 9 cells frozen so they will never be used for calculations.

Thanks for any help in advance!
Scott-
 
Try,

Array Formula, Confirmed with Control+Shift+Enter, not just Enter

=AVERAGE(IF(M11:M4000<>"",IF(M11:M4000 < D1,IF(U11:U4000="",D1-M11:M4000))))
 
Upvote 0

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
That doesn't work, but my method is still accurate and doesnt go negative if the date goes below because of the if false command i used. I'm happy enough with that, it does its job and I can hide that column and lock it so it wont get deleted.

Thanks for the help again :)
 
Upvote 0
OK, so i did this and it worked... In a separate column that I will hide, i did this formula;
=IF(M21="",FALSE,IF(U21="",IF($D$1>M21,$D$1-M21)))

and then i drag that down to 4000, just so every cell populates, then in a separate cell i did this to get the final calculation;
=SUBTOTAL(1,W11:W4000)

And that worked :)

Thanks for the help everyone!

Try...

Control+shift+enter, not just enter:
Code:
=AVERAGE(
    IF(U11:U4000="",
    IF(ISNUMBER(M11:M4000),
    IF(D1>M11:M4000,
      D1-M11:M4000))))
 
Upvote 0

Forum statistics

Threads
1,224,586
Messages
6,179,707
Members
452,939
Latest member
WCrawford

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