Solved

Date Format

Posted on 2013-06-21
2
315 Views
Last Modified: 2013-06-21
Hi,
I have some code that does some stuff pretty well, but I am trying to get a cell to have the value of a couple of cells and a varible, this line of code....

 WS4.Range("A2") = WS1.Range("C2") & " to " & Cust & " del " & WS1.Range("E2").Value

works fine in as much as it places the the three values I want into the correct cell but the date part, "(& WS1.Range("E2").Value)" is formatted as dd/mm/yyyy, and I want dd/mmm.
I have been trying for a while now, to no avail.
As always any help is much appreciated.
Thanks
0
Comment
Question by:Stephen Byrom
2 Comments
 
LVL 13

Accepted Solution

by:
Shanan212 earned 500 total points
ID: 39267113
 WS4.Range("A2") = WS1.Range("C2") & " to " & Cust & " del " & Format(WS1.Range("E2").Value, "dd/mmm")

Open in new window


 try this
0
 
LVL 1

Author Closing Comment

by:Stephen Byrom
ID: 39267524
Brilliant!!
Thanks a lot
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
Improved? Move/Copy Add-in Replacement - How to avoid the annoying, “A formula or sheet you want to move or copy contains the name XXX, which already exists on the destination worksheet.” David Miller (dlmille)  It was one of those days… I wa…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

896 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now