2 functions in 1

C

Chey

Right now I have
=DATE(YEAR(V4),MONTH(V4)-1,DAY(V4))

Works great however if I don't have a date in V4 then it comes back NUM. How
can I get rid of that. Can I do an if statement? or is just a cell format?

Thanks
Cheyenne
 
H

Harald Staff

Like
=IF(V4<31,"",DATE(YEAR(V4),MONTH(V4)-(V4>1),DAY(V4)))
or the little more mysterious
=IF(V4<31,"",DATE(YEAR(V4),MONTH(V4)-(V4>31),DAY(V4)))

HTH. Best wishes Harald
 

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

Similar Threads


Top