Excel 2007

mcverdan

New Member
Joined
Sep 16, 2011
Messages
7
Hi All. I am trying to type in excel 2007 the time 520 without the colon. Is there anyway that if you hit enter it would automatically be like this 5:20? I've been trying to set it in the time format but it would give me a result like 0 or with date. Can anybody help me how to fix it? Would really appreciate it.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
This would work:

Code:
Private Sub Worksheet_Change(ByVal Target As Range)
    Application.EnableEvents = False
    Target.Value = Mid(Target.Value, 1, Len(Target.Value) - 2) & ":" & Right(Target.Value, 2)
    Application.EnableEvents = True
End Sub
 
Upvote 0
Hi. Are you gonna do it on macro? sorry im not familiar yet with macro. Can you help me and guide me how to do it on macro so i can do it too? Thanks so much for the help. :)
 
Upvote 0
Hi. Are you gonna do it on macro? sorry im not familiar yet with macro. Can you help me and guide me how to do it on macro so i can do it too? Thanks so much for the help. :)

hi
in this case
all what you need to do
1. Right Click on sheet name .
2. View Code .
3. past cod to new screen.
4.close this window, or hit Alt+F11

then try the code
 
Upvote 0
Yay! Wow! Got it :) thanks so much my gosh!! been doing this for a week now whew! thanks for the help guys! God Bless :)
 
Upvote 0
Hi follow-up question.

If you save and close the excel file do you have to go to viewcode and paste it again if you want to use the same file format? thanks again. :)
 
Upvote 0
Hi follow-up question.

If you save and close the excel file do you have to go to viewcode and paste it again if you want to use the same file format? thanks again. :)

no
but in Excel 2007 and 2010 you should save your file As Xlsm Not Xlsx

when you save your file as Xlsx you will get this msg
a2vdie.jpg
 
Upvote 0

Forum statistics

Threads
1,224,600
Messages
6,179,836
Members
452,947
Latest member
Gerry_F

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