Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2
Default Format a cell so that if a 7 is entered it is shown as 07:00:00


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,268
Default Format a cell so that if a 7 is entered it is shown as 07:00:00

Please post the question in the body of the message, do not post the
question in the subject line only

This is not possible using formatting



--
Regards,

Peo Sjoblom



"Gregory OUSTED" wrote in message
...



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,624
Default Format a cell so that if a 7 is entered it is shown as 07:00:00

Not possible using formatting.

One workaround would be to use this event macro (right-click the
worksheet tab and choose view code):



Private Sub Worksheet_Change(ByVal Target As Excel.Range)
With Target
If .Count 1 Then Exit Sub
If Not Intersect(.Cells, Range("B3")) Is Nothing Then
If IsNumeric(.Value) Then
On Error Resume Next
Application.EnableEvents = False
.Value = .Value / 24
Application.EnableEvents = True
On Error GoTo 0
.NumberFormat = "[hh]:mm:ss"
End If
End If
End With
End Sub

Change the cell address to suit.

In article ,
Gregory OUSTED wrote:
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,231
Default Format a cell so that if a 7 is entered it is shown as 07:00:00

"Peo Sjoblom" wrote...
....
This is not possible using formatting


No?

A1: 7

A1's number format: 00":00:00"

Yes, this is almost certainly not what the OP wants, but it *IS* possible to
*SHOW* 07:00:00 when 7 is entered. It'll just be 7, not 7 o'clock.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Column of Text Shown = Total Times Shown? philcassell Excel Worksheet Functions 3 July 19th 06 07:24 AM
Formatted Cell Changes Format When Text Is Entered SundanceKidLudwig Setting up and Configuration of Excel 3 September 30th 05 09:21 PM
Cell Format Changes When Data Is Entered - Not Conditional Formatt SundanceKidLudwig Excel Worksheet Functions 2 September 30th 05 02:07 PM
Formatted Cell Changes Format When Information Is Entered SundanceKidLudwig Setting up and Configuration of Excel 1 September 29th 05 09:59 PM
Text shown up in other cells everytime a text is entered in 1 cell bioyyy Excel Discussion (Misc queries) 1 August 26th 05 05:26 PM


All times are GMT +1. The time now is 07:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"