![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
New Member
Join Date: Mar 2002
Location: Andrew
Posts: 8
|
I am trying to take the current date and add text to it. The problem I am having is I need the date in this format dd/mm. Here is the final outcome I am looking for:
03/07HOLD01 I need the date to be the current date and only have 12 characters to play with. Thanks |
|
|
|
|
|
#2 |
|
MrExcel MVP
Join Date: Feb 2002
Location: Sydney, Australia
Posts: 2,908
|
Hi,
You said you want it in dd/mm format but your example (assuming you were using today) is in mm/dd. However, you can easily change this code to whatever you need. Regards, D Code:
Sub DatePlusString() Dim strYourString strYourString = Format(Date, "mm/dd") & "HOLD01" MsgBox strYourString End Sub |
|
|
|
|
|
#3 |
|
New Member
Join Date: Mar 2002
Location: Andrew
Posts: 8
|
Worked great...thanks!!
|
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|