Senin, 05 September 2022
VBA Format date to text
There are 3 ways to doing these,
1. Format(activeworkbook("Sheet1").range("A1").Value, "dd/mm/yyyy hh:mm:ss AM/PM")
2. WorksheetFunction.Text(FormattingValue, "hh:mm:ss AM/PM")
3. "'" & Format(activeworkbook("Sheet1").range("A1").Value, "dd/mm/yyyy hh:mm:ss AM/PM")
or you can try to change format each column, which is :
--> Activeworkbook("Sheet1").range("A1:A10000").NumberFormat = "@"
1-3 for change directly by column and other option for change the column format before value adding.
5 September 2022
Kopipas _ Cibitung
Langganan:
Postingan (Atom)