I have one excel sheet which contain values in quarter like 2013 - Qtr 3, 2012 - Qtr 4 etc..
I am linking this excel sheet to access and in access I want to change this into dates, eg : 2013 - Qtr 3 should be shown as 07/01/2013 etc.
Please help.
I have one excel sheet which contain values in quarter like 2013 - Qtr 3, 2012 - Qtr 4 etc..
I am linking this excel sheet to access and in access I want to change this into dates, eg : 2013 - Qtr 3 should be shown as 07/01/2013 etc.
Please help.
Because of the odd return, you will need a function in a new cell to import the correct date.
usage: =CvtQtr2Date(A1)
Code:Public Function CvtQtr2Date(ByVal pvQtrTxt) Dim Q As Integer Dim M, Y Y = Left(pvQtrTxt, 4) Q = Mid(pvQtrTxt, InStr(pvQtrTxt, ",") - 1, 1) Select Case Q Case 1 M = 1 Case 2 M = 4 Case 3 M = 7 Case 4 M = 10 End Select CvtQtr2Date = M & "/1/" & Y End Function