problem with entering month of the year

S

S S

I am using the following formula to display in cell xx £200 ( I have
altered this slightly as it used to display two different values, 150/200 to
200/200)

=CHOOSE(MATCH(D7,{0;5;7;11},1),"",200,200,"")

The value (£s) is triggered by the month of the year 06/07/08/09 etc, I had
a person fill in the form using Sept rather than 09 and the displayed N/A

Is there a way around this? Or does it just complicate things too much.

thanks
 
D

daddylonglegs

You could amend formula to cope with Text months only

=CHOOSE(MATCH(MONTH("1-"&D7),{0;5;7;11},1),"",200,200,"")

or to handle either "sept" or 09

=CHOOSE(MATCH(IF(ISTEXT(D7),MONTH("1-"&D7),D7),{0;5;7;11},1),"",200,200,"")

although it might be simpler to use LOOKUP rather than CHOOSE/MATCH

=LOOKUP(IF(ISTEXT(D7),MONTH("1-"&D7),D7),{0;5;7;11},{"",200,200,""})
 

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