excel - Get date value based on month name -



excel - Get date value based on month name -

the scenario have follows:

cell a1 - contains name of current month, e.g. "october" cell a2 - contains value of current year, e.g. "2014" cell a3 - contains value of given day, e.g "22"

i'd populate a3 formula give value 22 oct 2014 , have formatted date can perform comparisons , calculations in other cells - along lines of 22 + a1 + a2. i've tried using concatenate function doesn't allow me format cell date.

is possible using standard excel functions?

you're looking datevalue function. can convert month names numerical date expression, can format date (dd/mm/yyyy in illustration below).

=datevalue(a3 & " " & a1 & " " & a2)

as bonus, work if a1 contains short-form month names i.e. jan, feb, mar, etc.

i did bit of testing, showed can drop " " space delimiters entirely:

=datevalue(a3&a1&a2)

in fact, using -- forcefulness excel treat concatenated string numerical value works well!

=--(a3&a1&a2)

so far, testing has not found instance -- doesn't work datevalue. leaves me wondering point of datevalue is.

excel date format excel-2011

Comments

Popular posts from this blog

formatting - SAS SQL Datepart function returning odd values -

c++ - Apple Mach-O Linker Error(Duplicate Symbols For Architecture armv7) -

php - Yii 2: Unable to find a class into the extension 'yii2-admin' -