Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
don don is offline
external usenet poster
 
Posts: 8
Default concatenting dates showing m/d instead of m/d/y

I have a program that finds rolling 1 - 30 aged data.
The heading has 1 - 30
above that I would like to put the dates, such as 1/18 - 2/17
The below subroutine does that except the dates show the year also.

Any ideas on how to have it show what I want.
Thanks
Don

Sub concatenate()
Range("A12").NumberFormat = "m/d"
Range("a16") = Range("A12") & " - " & Range("B12")
Range("A16").NumberFormat = "m/d"

End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,058
Default concatenting dates showing m/d instead of m/d/y

Look at:

Sub Macro1()
Range("H1").Value = Application.Text(Range("F1").Value, "m/d;@") & "-" &
Application.Text(Range("G1").Value, "m/d;@")
End Sub


with dates in F1 and G1
--
Gary''s Student


"don" wrote:

I have a program that finds rolling 1 - 30 aged data.
The heading has 1 - 30
above that I would like to put the dates, such as 1/18 - 2/17
The below subroutine does that except the dates show the year also.

Any ideas on how to have it show what I want.
Thanks
Don

Sub concatenate()
Range("A12").NumberFormat = "m/d"
Range("a16") = Range("A12") & " - " & Range("B12")
Range("A16").NumberFormat = "m/d"

End Sub

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default concatenting dates showing m/d instead of m/d/y

On Fri, 17 Feb 2006 18:34:50 -0800, don wrote:

I have a program that finds rolling 1 - 30 aged data.
The heading has 1 - 30
above that I would like to put the dates, such as 1/18 - 2/17
The below subroutine does that except the dates show the year also.

Any ideas on how to have it show what I want.
Thanks
Don

Sub concatenate()
Range("A12").NumberFormat = "m/d"
Range("a16") = Range("A12") & " - " & Range("B12")
Range("A16").NumberFormat = "m/d"

End Sub



Sub concatenate()

Range("a16") = Format(Range("A12"), "m/d") & _
" - " & Format(Range("B12"), "m/d")

End Sub


--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Dates in fomula showing as whole number Dave New Users to Excel 10 July 11th 09 02:44 AM
how do I look for cells showing dates less than a certain date? Annie and Naseem @ Ecojustice Excel Worksheet Functions 1 April 16th 09 01:15 AM
Stop dates from showing as numbers - when formated as dates JR Excel Discussion (Misc queries) 1 October 29th 08 04:38 PM
Dates showing are not what I type Mick New Users to Excel 5 July 6th 06 04:19 AM
Combo Box Showing numbers not dates Mo Excel Discussion (Misc queries) 1 December 14th 04 05:39 PM


All times are GMT +1. The time now is 12:34 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"