Question about Excel Worksheet Formula Syntax - Using {}

I have thefollowing formula. I would like to use reference cells for the parts of the formula which are in bold. So I would like to put D5 for the first Date and D6 for the second date.


When I substitute those cells with the dates  I get an error which says "The formula typed contains an error")

I believe this is because I am not using the correct syntax.

How can I substitute the dates with actual cells?

Who is Participating?
barry houdiniCommented:
Try using CHOOSE function in there, i.e.


I'm assuming that D5 and D6 contain the values 20111230 and 20120816 (which are numbers not dates). If D5 and D6 contain dates then try this version instead


regards, barry
awesomejohn19Author Commented:
Thanks for the quick answer. The first formula works!!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.