Anzeige
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

zahlenformate

Forumthread: zahlenformate

zahlenformate
03.04.2008 18:11:06
michi
hallo,
in einer markierten zelle steht eine zahl (nehmen wir mal die 55).
in diese zelle wird folgender neuer wert eingetragen:
ActiveCell.FormulaR1C1 = format(datum, "DD.MM") & "_" & ActiveCell.Value
datum wird aus anderer zelle genommen.
frage zum datum:
das ausgebeformat ist in diesem fall z.b.: 01.04
ich möchte aber: Apr.01
frage zur zahl:
acvtivecell.value sind besagte 55.
der neue wert soll jetzt aber nicht 55 sondern 0055 haben.
gesamt soll es dann so aussehen:
apr.01_0055
vielen dank für eure hilfe
michi

Anzeige

2
Beiträge zum Forumthread
Beiträge zu diesem Forumthread

Betreff
Datum
Anwender
Anzeige
AW: zahlenformate
03.04.2008 18:58:00
Erich
Hallo Michi,
probier mal

Sub a()
Dim myDat As Date
myDat = Date
ActiveCell.FormulaR1C1 = Format(myDat, "MMM.DD") & "_" & Format(ActiveCell.Value, "0000")
'oder
With ActiveCell
.FormulaR1C1 = Format(myDat, "MMM.DD") & "_" & Format(.Value, "0000")
End With
End Sub

Rückmeldung wäre nett! - Grüße von Erich aus Kamp-Lintfort

Anzeige
AW: zahlenformate
03.04.2008 19:10:00
michi
danke erich,
funktioniert prima
grüße aus münchen
;

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige