I have an excel sheet in which one of the column is transaction time and its format is HH:MM:SS. But I need transaction time in HHMM format so that i can upload that excel sheet into my application. As of now i am manually formatting each row, is there any way i can apply required format to whole column at once?
If for your eyes only:
select whole column, right click somewhere in your selection, go to Format Cells, tab Number, Catergory Custom.
If you need this as the actual value:
make a column containing the following formula
Note that it is language-dependant whether you need a , or ; in that formula.
You have two options:
- Custom format the field.
- Use a function in another cell. Suppose, cell
A1contains the text
15:48:58. You use the formula in another cell (say B1) as
=TEXT(HOUR(A1),"00")&TEXT(MINUTE(A1),"00"). This gives the output as
For example, type
B2 cell. When we convert
0.633 to time means we convert
0.633day. We consider 24 hours as 1 day.
Follow the steps:
- Select B2 cell and right click.
- From shortcut menu, go to Format cells. Format cells dialog box appears.
- In the dialog box. click custom under Category list. Find
hh:mm:ssfrom right list.
- Now edit it as
hhmmssin the right side just under ‘Type:’.
You may read this tutorial from msofficeworld: Format Time in Excel