# Microsoft Office Application Help - Excel Help forum > Excel Formulas & Functions >  > [SOLVED] Concatenate Month and Year (But not Day!) columns into a single column containing the date

## panaceus

This is probably quite simple, but I'm not sure how to solve it:

I have a sheet with a month column (e.g. 3) and year column (e.g. 2001).  I'd like to combine the two into a single column reading 3/2001, 3-2001, or any standard date format.  I've tried to use the DATE function, but it seems to insist on a "DAY" input.

I'd appreciate any advice.  Thanks!

----------


## djapigo

Hi panaceus,

Say A2 contains 3 and B2 contains 2001...

If you just need a text version, then simply use =A2&"/"&B2
or =TEXT(DATE(B2,A2,1),"m/yyyy")

If you want it to read as a date, then use =DATE(B2,A2,1) then format your date as m/yyyy

----------


## p24leclerc

You can use the date function and give day 1 in your formula. Then you change the format of those cell to show only month and year. A format like mm-yyyy will do it.

----------


## panaceus

Thanks guys, that's perfect!

----------


## Rachel262

I have used the formula =DATE(A2,B2,1)as recommended above and it works perfectly. The issue I have is that where there is no month or year I would like the formula to return blank. At present I am getting #VALUE!. I have tried to use ISNA, ISBLANK and IF <> " ", but clearly I am not putting them in the right place as I can't make the formula work so that it returns a date where the reference cells have values but a blank if the reference cells are blank. Advice would be gratefully received.

----------


## Jonmo1

Try
=IFERROR(DATE(A2,B2,1),"")

----------


## Rachel262

Perfect!  :Smilie:  Thank you!

----------

