extract date from last cell

P

puiuluipui

Hi, i have this code:
=IF(Acte!A1="","",IF(TODAY()>=Acte!A1,"expired",Acte!A1-TODAY()))
This code extract a date from A1, but now i have a group of 4 cells with
diferrent dates.
A B C D
01.01.2009 01.03.2009 01.06.2009 01.09.2009

All i need is that the code look in "A1:D1" and if a cell it's bigger than
today, than to take the data from the next cell. Ex: today is 30.06.2009, so
the code to look in "D1" - 01.09.2009.

Can this be done?
Thanks.
 
P

puiuluipui

Your formula is good, but there is any way to combine this two formulas?
Because i need the formula to calculate how days remains. Your formula minus
today = 63 days. And i need this in one formula.

=IF(Acte!A1="","",IF(TODAY()>=Acte!A1,"expired",Acte!A1-TODAY()))
=INDEX(A1:D1,,MIN(IF(A1:D1>TODAY(),COLUMN(A1:D1))))

Thanks allot!




"Jacob Skaria" a scris:
 
J

Jacob Skaria

Try the below. Again Array entered.

=IF(COUNT(A1:D1),IF(TODAY()>=MAX(A1:D1),"Expired",INDEX(A1:D1,,MIN(IF(A1:D1>TODAY(),COLUMN(A1:D1))))-TODAY()),"")

If this post helps click Yes
 
P

puiuluipui

WORKS GREAT!
Thanks!!

"Jacob Skaria" a scris:
Try the below. Again Array entered.

=IF(COUNT(A1:D1),IF(TODAY()>=MAX(A1:D1),"Expired",INDEX(A1:D1,,MIN(IF(A1:D1>TODAY(),COLUMN(A1:D1))))-TODAY()),"")

If this post helps click Yes
 
P

puiuluipui

Hi Jacob, i know this is an old post, but i need to transform this code a
little bit. I need this code to do exactly the same thing, but only if in
sheet 2, the same range, in corresponding cell, i enter bill's number/date.
If the date has past and in sheet 2 corresponding cell is empty, then to
display "Please Pay". If in corresponding cell is something, then the code to
look in next cell(To do exactly was the code is doing now).
Can this be done?
Thanks!
 

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