Tuesday, March 24, 2015

Concatenate text and convert to numbers in Excel

I have a long Excel file which keep the date, month, year, hour, minute, and second in separate columns (figure 1). I want to use only one column to present the time, so it would be easier to plot the time as x-axis. Here is the function I used in cell G2:

=VALUE(CONCATENATE(A2,"/",B2,"/",C2," ",D2,":",E2,":", F2))


The Value function convert the text into numbers.
The Concatenate function connects all the text and convert them into one string.

No comments:

Post a Comment