Mrrrr's Forum (VIEW ONLY)
Un forum care ofera solutii pentru unele probleme legate in general de PC. Pe langa solutii, aici puteti gasi si alte lucruri interesante // A forum that offers solutions to some PC related issues. Besides these, here you can find more interesting stuff.
Lista Forumurilor Pe Tematici
Mrrrr's Forum (VIEW ONLY) | Reguli | Inregistrare | Login

POZE MRRRR'S FORUM (VIEW ONLY)

Nu sunteti logat.
Nou pe simpatie:
crazygirl pe Simpatie.ro
Femeie
22 ani
Buzau
cauta Barbat
26 - 80 ani
Mrrrr's Forum (VIEW ONLY) / Tutoriale si Ghiduri Utile // Tutorials and useful guides / [EXCEL] Insert myDate and myTime in the Same Cell [VBA] Moderat de TRaP, TonyTzu
Autor
Mesaj Pagini: 1
TRaP
Moderator

Inregistrat: acum 6 ani
Postari: 748
If you want to add a personal timestamp (you don't want =Now()), for example you want to add a date and a time written in 2 cells, and want the print date to appear in the same cell but contain both date and time.



Dim myDate
Dim myTime

myDate = ActiveSheet.Range("K" & (ActiveCell.Row)).Value
myTime = ActiveSheet.Range("J" & (ActiveCell.Row)).Value

Worksheets("PRINTA5").Range("PrintDate").Value = Format(myDate, "dd.mm.yyyy") + " " + Format(myTime, "hh:mm")


You can see it uses + instead of & to join date and time.

Source for + usage:

More on date and time entry:


pus acum 5 ani
   
Pagini: 1  

Mergi la