Help with date formula

S

S S

The formulas below are used to return a date in 2 seperate boxes on my
spreadsheet how can i get the year 1900 to read 2006

=IF(AND(E7=2006,D7=0,C7=0),DATE(2006,1,1),DATE(E7,D7,C7)) This returns
31st July 2006, which is correct

=IF(AND(I7=2006,H7=0,G7=0),DATE(2006,1,1),DATE(EI7,H7,G7)) This returns
20th August 1900, should be year 2006

I am not good with formulas so cant for the life of me see whats wrong,

Can someone spot the mistake for me.

thanks
 
G

Gary''s Student

Just a small typo:

=IF(AND(I7=2006,H7=0,G7=0),DATE(2006,1,1),DATE(EI7,H7,G7))

probably should be:

=IF(AND(I7=2006,H7=0,G7=0),DATE(2006,1,1),DATE(I7,H7,G7))
 
S

S S

Spot on, Many thanks for helping me.


Gary''s Student said:
Just a small typo:

=IF(AND(I7=2006,H7=0,G7=0),DATE(2006,1,1),DATE(EI7,H7,G7))

probably should be:

=IF(AND(I7=2006,H7=0,G7=0),DATE(2006,1,1),DATE(I7,H7,G7))
 

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