Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
752to756
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
752to756
752to756
Aktuelles Verzeichnis
Verzeichnis Index
Verzeichnis Index
Übersicht Verzeichnisse
msgbox Format [hh]:mm
10.04.2006 23:05:48
Ulf
Hallo ihr Excelprofis
gibt es überhaupt eine Möglichkeit Zeiten über 24 Stunden darzustellen
Sub Zeiten() for x=6 to 100 var = var + cells(x,2) next x msgbox x End Sub
im Voraus vielen Dank
mfg Ulf

5
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: msgbox Format [hh]:mm
10.04.2006 23:32:57
Ramses
Hallo
wenn du damit nicht unbedingt weiterrechnen willst
Das ist die Tabelle
 
 A
19.00 h
212.00 h
312.00 h
412.00 h
512.00 h
 

und das der Code dazu
Option Explicit

Sub DemoTime()
    Dim i As Integer
    Dim tmpTime As Date
    For i = 1 To 5
        tmpTime = tmpTime + Cells(i, 1).Value
    Next i
    MsgBox Format(Int(tmpTime * 24), "00") & ":" & Format(Int((tmpTime * 24) - Int(tmpTime * 24)) * 60, "00") & " Stunden"
End Sub


Gruss Rainer
Anzeige
AW: msgbox Format [hh]:mm
10.04.2006 23:59:39
Erich
Hallo Ulf,
oder so: Option Explicit Sub Zeiten() Dim zz As Long, tmpTime As Date Const korr = 0.00000000000001 For zz = 6 To 100 tmpTime = tmpTime + Cells(zz, 2) Next zz MsgBox Int(tmpTime * 24 + korr) & Format(tmpTime, ":nn") & " Stunden" ' oder so: MsgBox Format(Int(tmpTime * 24 + korr), "00") & ":" & _ Format((tmpTime * 24 + korr - Int(tmpTime * 24 + korr)) * 60, "00") & " Stunden" End Sub
Rückmeldung wäre nett! - Grüße von Erich aus Kamp-Lintfort
AW: msgbox Format [hh]:mm
10.04.2006 23:38:13
PeterW
Hallo Ulf,
hab hier keine Version 8, mit 2003 geht es beispielsweise so:
MsgBox Int(var) * 24 + Hour(var) & ":" & Minute(var)
Gruß
Peter
Anzeige
AW: msgbox Format [hh]:mm
11.04.2006 09:08:20
Erich
Hi Ulf,
ich hab noch mal ein paar Formeln aufgeschrieben und getestet:
 
 GH
1Formel 
21Format(Int(tmpTime * 24), "00") & ":" & Format(Int((tmpTime * 24) - Int(tmpTime * 24)) * 60, "00") & " Std"
32Format(Int(tmpTime * 24 + korr), "00") & ":" & Format((tmpTime * 24 + korr - Int(tmpTime * 24 + korr)) * 60, "00") & " Std"
43Int(tmpTime * 24 + korr) & Format(tmpTime, ":nn") & " Std"
54Format(Int(tmpTime * 24), "00") & Format(tmpTime, ":nn") & " Std"
65Format(Int(tmpTime * 24 + korr), "00") & Format(tmpTime, ":nn") & " Std"
76Int(tmpTime) * 24 + Hour(tmpTime) & ":" & Minute(tmpTime) & " Std"
87Int(tmpTime) * 24 + Hour(tmpTime) & ":" & Format(Minute(tmpTime), "00") & " Std"
 
Diagramm - Grafik - Excel Tabellen einfach im Web darstellen    Excel Jeanie HTML  3.0    Download  
Die erzeugen in vier Beispielen folgende Ausgaben:
 
 BCDEF
1SummandenAusgabeFormelok 
220:20:0060:00 Std1  
320:20:0061:00 Std2ja 
420:20:0061:00 Std3ja 
5 60:00 Std4  
6 61:00 Std5ja 
7 61:0 Std6  
8 61:00 Std7ja 
9     
101:01:0001:00 Std1  
11 01:01 Std2ja 
12 1:01 Std3fast 
13 01:01 Std4ja 
14 01:01 Std5ja 
15 1:1 Std6  
16 1:01 Std7fast 
17     
181:10:0001:00 Std1  
19 01:10 Std2ja 
20 1:10 Std3fast 
21 01:10 Std4ja 
22 01:10 Std5ja 
23 1:10 Std6fast 
24 1:10 Std7fast 
25     
261:01:3001:00 Std1  
27 01:02 Std2ja(gerundet)
28 1:01 Std3fast(abgerundet)
29 01:01 Std4ja(abgerundet)
30 01:01 Std5ja(abgerundet)
31 1:1 Std6  
32 1:01 Std7fast(abgerundet)
 
Diagramm - Grafik - Excel Tabellen einfach im Web darstellen    Excel Jeanie HTML  3.0    Download  
Die Ausgabe [hh]:mm wird nur bei den Formeln 2 und 5 erzeugt.
Die Prozedur dazu ist in der Mappe https://www.herber.de/bbs/user/32762.xls
Rückmeldung wäre nett! - Grüße von Erich aus Kamp-Lintfort
Anzeige
AW: msgbox Format [hh]:mm
11.04.2006 15:54:38
Ulf
Hallo Rainer
Hallo Erich
Hallo Peter
Die Lösungen sind alle ganz interressant
Weiterrechnen wollte ich mit Summen nicht, das kann ich ja schon vorher in Vba
Ich wollte nur die Ausgabe der Daten Formatieren.
Danke an euch allen
Entschuldigung das meine Antwort so lange gedauert hat.
mfg Ulf

304 Forumthreads zu ähnlichen Themen

Anzeige
Anzeige
Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige