Ask Question Forum:
Model Library:2025-02-08:A.I. model is online auto reply
C
O
M
P
U
T
E
R
2
8
Show
#
ASK
RECENT
←
- Underline
- Bold
- Italic
- Indent
- Step
- Bullet
- Quote
- Cut
- Copy
- Paste
- Table
- Spelling
- Find & Replace
- Undo
- Redo
- Link
- Attach
- Clear
- Code
Below area will not be traslated by Google,you can input code or other languages
Hint:If find spelling error, You need to correct it,1 by 1 or ignore it (code area won't be checked).
X-position of the mouse cursor
Y-position of the mouse cursor
Y-position of the mouse cursor
Testcursor
caretPos
Attachment:===
Asked by Tocogroup
at 2024-07-25 04:18:24
Point:500 Replies:4 POST_ID:829101USER_ID:11762
Topic:
Microsoft Excel Spreadsheet Software;;
Hi Experts,
I have an Excel sheet in which dates are split out across 3 columns. For example, I have 01 in column A, "Sep" in column B and 2013 in column C.
I want to create a formatted date (dd/mm/yyyy) in column D. How do I do this in VBA (I can do it manually entering a formula) ?
Thanks
Toco
I have an Excel sheet in which dates are split out across 3 columns. For example, I have 01 in column A, "Sep" in column B and 2013 in column C.
I want to create a formatted date (dd/mm/yyyy) in column D. How do I do this in VBA (I can do it manually entering a formula) ?
Thanks
Toco
Expert: duncanb7 replied at 2024-07-25 04:44:02
Thanks for your points
Have a nice day
Duncan
Have a nice day
Duncan
Author: Tocogroup replied at 2024-07-25 04:42:43
Many thanks. That works fine.
To answer the previous expert's question I used =DATEVALUE(1&"/"&MONTH(C2&1)&"/"&B2) as a formula within the sheet. No doubt this can be adapted to a VBA solution.
To answer the previous expert's question I used =DATEVALUE(1&"/"&MONTH(C2&1)&"/"&B2) as a formula within the sheet. No doubt this can be adapted to a VBA solution.
Accepted Solution
Expert: duncanb7 replied at 2024-07-25 04:27:25
500 points EXCELLENT
You can try this
Duncan
Duncan
Sub test()Sheets(1).SelectWith ActiveSheet.Range("D1").NumberFormat = "dd/mm/yyyy".Range("D1").Value = .Range("A1") &. Range("B1") & .Range("C1")End WithEnd Sub 1:2:3:4:5:6:7:
Expert: Randy Poole replied at 2024-07-25 04:25:30
which formula are you using?