date format and random

jefflee

Board Regular
Joined
Jun 8, 2015
Messages
80
Hi, I am new to this forum and learning vba for 2 years but still no progress.
I am now seeking for help;

cell a1 is a value to be entered
cell a2 is the final time converted from cell a1

if I want cell a2 to be in the time format say 17:13:48 and I want the numbers entered in a1 is 171348 . is it possible ?

I am now entered 17.23 in cell a1 and a2 as a1/24 and return the time 17:13:48

but it is very difficult for me to enter the exact time . ( the other way I know is using 3 cells to contain the three values . )

if i just use 171348 and returns 17:13:48 , if would be great !!

regards
jeff
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
you could have it by doing: =LEFT(A1,2)&":"&MID(A1,3,2)&":"&RIGHT(A1,2)

bit crude but gets the job done
 
Upvote 0

Forum statistics

Threads
1,215,674
Messages
6,126,144
Members
449,294
Latest member
Jitesh_Sharma

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top