Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 703
Default perm change of date not just format

I want to extract day out of 1/31/2007 and have only 1/2007 left in the cell
after
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,316
Default perm change of date not just format

The function used assumes the first date to be in A1, change the cell address
as needed.

Insert a blank column to the right of your dates as a helper column.

In the first row enter the following formula:

=TEXT(MONTH(G9),"#0")&"/"&TEXT(YEAR(G9),"0000")

Copy down the length of the column. Then copy the column of dates you've
just created with the formula. Move to cell A1 and do an EDIT/PASTE SPECIAL
and select values.

Your dates have been replaced with the values the formula produced. Delete
the helper column when done.
--
Kevin Backmann


"charlie" wrote:

I want to extract day out of 1/31/2007 and have only 1/2007 left in the cell
after

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default perm change of date not just format

=TEXT(MONTH(G9),"#0")&"/"&TEXT(YEAR(G9),"0000")

That can be reduced to:

=TEXT(G9,"m/yyyy")


--
Biff
Microsoft Excel MVP


"Kevin B" wrote in message
...
The function used assumes the first date to be in A1, change the cell
address
as needed.

Insert a blank column to the right of your dates as a helper column.

In the first row enter the following formula:

=TEXT(MONTH(G9),"#0")&"/"&TEXT(YEAR(G9),"0000")

Copy down the length of the column. Then copy the column of dates you've
just created with the formula. Move to cell A1 and do an EDIT/PASTE
SPECIAL
and select values.

Your dates have been replaced with the values the formula produced.
Delete
the helper column when done.
--
Kevin Backmann


"charlie" wrote:

I want to extract day out of 1/31/2007 and have only 1/2007 left in the
cell
after



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default perm change of date not just format

Are you saying that you want text instead of the date, or do you want the
date to be changed to 1/1/2007 formatted as 1/2007?
=TEXT(A1,"m/yyyy")
=DATE(YEAR(A1),MONTH(A1),1) and format as m/yyyy
--
David Biddulph

"charlie" wrote in message
...
I want to extract day out of 1/31/2007 and have only 1/2007 left in the
cell
after



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 75
Default perm change of date not just format

Excel stores dates as numbers. The dates start with 1/1/1900 which is day 1.
1/2/1900 is day 2. The date 1/13/2007 is actually stored as the number
39095. There is no "day" in the number 39005. Excel calculates the day
based on the number 39095. Do you want the text "1/2007" to be the result in
the cell?

Dave



"charlie" wrote in message
...
I want to extract day out of 1/31/2007 and have only 1/2007 left in the
cell
after





  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default perm change of date not just format

What's the advantage of =TEXT(MONTH(G9),"#0")&"/"&TEXT(YEAR(G9),"0000")
compared with =TEXT(G9,"m/yyyy"), Kevin?
--
David Biddulph

"Kevin B" wrote in message
...
The function used assumes the first date to be in A1, change the cell
address
as needed.

Insert a blank column to the right of your dates as a helper column.

In the first row enter the following formula:

=TEXT(MONTH(G9),"#0")&"/"&TEXT(YEAR(G9),"0000")

Copy down the length of the column. Then copy the column of dates you've
just created with the formula. Move to cell A1 and do an EDIT/PASTE
SPECIAL
and select values.

Your dates have been replaced with the values the formula produced.
Delete
the helper column when done.
--
Kevin Backmann


"charlie" wrote:

I want to extract day out of 1/31/2007 and have only 1/2007 left in the
cell
after



  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 703
Default perm change of date not just format

I would like to have just the month and year left when I'm done

"Wondering" wrote:

Excel stores dates as numbers. The dates start with 1/1/1900 which is day 1.
1/2/1900 is day 2. The date 1/13/2007 is actually stored as the number
39095. There is no "day" in the number 39005. Excel calculates the day
based on the number 39095. Do you want the text "1/2007" to be the result in
the cell?

Dave



"charlie" wrote in message
...
I want to extract day out of 1/31/2007 and have only 1/2007 left in the
cell
after




  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 703
Default perm change of date not just format

Thank you I will try it shortly.

"Kevin B" wrote:

The function used assumes the first date to be in A1, change the cell address
as needed.

Insert a blank column to the right of your dates as a helper column.

In the first row enter the following formula:

=TEXT(MONTH(G9),"#0")&"/"&TEXT(YEAR(G9),"0000")

Copy down the length of the column. Then copy the column of dates you've
just created with the formula. Move to cell A1 and do an EDIT/PASTE SPECIAL
and select values.

Your dates have been replaced with the values the formula produced. Delete
the helper column when done.
--
Kevin Backmann


"charlie" wrote:

I want to extract day out of 1/31/2007 and have only 1/2007 left in the cell
after

  #9   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,058
Default perm change of date not just format

Select the cells you want to update and run:

Sub day_killer()
For Each r In Selection
With r
s = Split(.Text, "/")
.NumberFormat = "@"
.Value = s(0) & "/" & s(2)
End With
Next
End Sub

--
Gary''s Student - gsnu200747


"charlie" wrote:

I would like to have just the month and year left when I'm done

"Wondering" wrote:

Excel stores dates as numbers. The dates start with 1/1/1900 which is day 1.
1/2/1900 is day 2. The date 1/13/2007 is actually stored as the number
39095. There is no "day" in the number 39005. Excel calculates the day
based on the number 39095. Do you want the text "1/2007" to be the result in
the cell?

Dave



"charlie" wrote in message
...
I want to extract day out of 1/31/2007 and have only 1/2007 left in the
cell
after




  #10   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default perm change of date not just format

On Thu, 27 Sep 2007 13:51:01 -0700, charlie
wrote:

I want to extract day out of 1/31/2007 and have only 1/2007 left in the cell
after


You can only do that if you want to have the cell contain TEXT and not a true
Excel date that you can subsequently manipulate as a date.

Why is the content vs the appearance so important? Depending on the reason,
there might be a 'better' solution.
--ron


  #11   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 75
Default perm change of date not just format

As text?

"charlie" wrote in message
...
I would like to have just the month and year left when I'm done

"Wondering" wrote:

Excel stores dates as numbers. The dates start with 1/1/1900 which is day
1.
1/2/1900 is day 2. The date 1/13/2007 is actually stored as the number
39095. There is no "day" in the number 39005. Excel calculates the day
based on the number 39095. Do you want the text "1/2007" to be the result
in
the cell?

Dave



"charlie" wrote in message
...
I want to extract day out of 1/31/2007 and have only 1/2007 left in the
cell
after






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
Use date modified to change format & create filter to track change PAR Excel Worksheet Functions 0 November 15th 06 09:17 PM
Can I change a date with no format (20051111) to date format? Rose New Users to Excel 2 November 11th 05 09:03 PM
Change general format to US date format woodlot4 Excel Discussion (Misc queries) 3 October 11th 05 12:29 AM
how do I format cells to change date and time to just date bondam Excel Discussion (Misc queries) 3 July 3rd 05 01:10 PM
How would I remove a pagebreak and page number on a workbook perm. Frustrated New Users to Excel 3 January 15th 05 06:25 PM


All times are GMT +1. The time now is 04:25 PM.

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

About Us

"It's about Microsoft Excel"