Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
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 |
Display Modes | |
|
|