=DATE(
MID(A1,SEARCH(",",A1)+2,4),
IF(LEFT(A1,3)="Jan",1,
IF(LEFT(A1,3)="Feb",2,
IF(LEFT(A1,3)="Mar",3,
IF(LEFT(A1,3)="Apr",4,
IF(LEFT(A1,3)="May",5,
IF(LEFT(A1,3)="Jun",6,
IF(LEFT(A1,3)="Jul",7,
IF(LEFT(A1,3)="Aug",8,
IF(LEFT(A1,3)="Sep",9,
IF(LEFT(A1,3)="Oct",10,
IF(LEFT(A1,3)="Nov",11,
IF(LEFT(A1,3)="Dec",12)))))))))))),
MID(A1,SEARCH(" ",A1)+1,SEARCH(",",A1)-1-SEARCH(" ",A1))
)
However, it would certainly be a lot simpler and cleaner if there was a single function, etc., for the Month argument. In fact, for something so common, I anticipate there is (a function) and I have just not yet learned it. =IF(LEFT(A1,3)="Jan",1,
IF(LEFT(A1,3)="Feb",2,
IF(LEFT(A1,3)="Mar",3,
IF(LEFT(A1,3)="Apr",4,
IF(LEFT(A1,3)="May",5,
IF(LEFT(A1,3)="Jun",6,
IF(LEFT(A1,3)="Jul",7,
IF(LEFT(A1,3)="Aug",8,
IF(LEFT(A1,3)="Sep",9,
IF(LEFT(A1,3)="Oct",10,
IF(LEFT(A1,3)="Nov",11,
IF(LEFT(A1,3)="Dec",12))))))))))))
Thanks
ASKER
Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.
TRUSTED BY