Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Copy Date on Excel Tab to Cell In Spreadsheet and Add Year, How?

I work on bank reconciliations and the tabs say "7-19", "7-18" etc.
Figured out how to auto copy the tab data but how can I add to it so it
reads "7-19-06"?

THANKS!!!

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Copy Date on Excel Tab to Cell In Spreadsheet and Add Year, How?


Try This
Change the range to where you want the date displayed

Sub getname()
Dim name As Date
name = ActiveSheet.name
Range("D26").Select
ActiveCell.Value = name
ActiveCell.Select
Selection.NumberFormat = "d-mmm-yy"
End Sub

if i have misunderstood what you wanted let me know!


--
Steel Monkey
------------------------------------------------------------------------
Steel Monkey's Profile: http://www.excelforum.com/member.php...o&userid=29051
View this thread: http://www.excelforum.com/showthread...hreadid=565863

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Copy Date on Excel Tab to Cell In Spreadsheet and Add Year, How?


Try This
Change the range to where you want the date displayed

Sub getname()
Dim name As Date
name = ActiveSheet.name
Range("D26").Select
ActiveCell.Value = name
ActiveCell.Select
Selection.NumberFormat = "d-mmm-yy"
End Sub

if i have misunderstood what you wanted let me know!


--
Steel Monkey
------------------------------------------------------------------------
Steel Monkey's Profile: http://www.excelforum.com/member.php...o&userid=29051
View this thread: http://www.excelforum.com/showthread...hreadid=565863

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3
Default Copy Date on Excel Tab to Cell In Spreadsheet and Add Year, How?

I can't use macros the bank doesn't like it. I tried formatting the
field as dd/mm/yy but it doesn't add the year when i copy the tab value
of "7-19".

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,688
Default Copy Date on Excel Tab to Cell In Spreadsheet and Add Year, How?

Hi!

The file must already exist ( having been saved and given a file name):

=DATEVALUE(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255))

Format the cell as DATE

This will return the current year. If you need a specific year:

=DATEVALUE(MID(CELL("filename",A1),FIND("]",CELL("filename",A1))+1,255)&"-year_number")

Replace year_number as needed: 05, 1999, 2000, 02 etc.

Biff

wrote in message
oups.com...
I work on bank reconciliations and the tabs say "7-19", "7-18" etc.
Figured out how to auto copy the tab data but how can I add to it so it
reads "7-19-06"?

THANKS!!!



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



All times are GMT +1. The time now is 09:23 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"