#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Barry Clark
 
Posts: n/a
Default Date referencing


Hello all. I am still trying to get this timesheet where I want it.

This is where I am at:

I have a cell that mentions the year (G7) and the sheet mentions the
pay period beginning (ex: January 1).

I would like to have a different cell (B9) combine the two into a date
that other cells would recognize as such.

For instance, if the sheet name is January 1st and cell G7 has "2006"
as a value, then I would like B9 to read "1/16" (year not shown). From
there another cell (A13) would show that day/date as "Sunday, January
01, 2006".

Any help would be greatly appreciated.


--
Barry Clark
------------------------------------------------------------------------
Barry Clark's Profile: http://www.excelforum.com/member.php...o&userid=35267
View this thread: http://www.excelforum.com/showthread...hreadid=555570

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Barb Reinhardt
 
Posts: n/a
Default Date referencing

You might try using something like this:

If year is in cell A1 and month and day are in cell A2
=date(year(A1),month(A2),day(A2))
and format it appropriately.


"Barry Clark" wrote:


Hello all. I am still trying to get this timesheet where I want it.

This is where I am at:

I have a cell that mentions the year (G7) and the sheet mentions the
pay period beginning (ex: January 1).

I would like to have a different cell (B9) combine the two into a date
that other cells would recognize as such.

For instance, if the sheet name is January 1st and cell G7 has "2006"
as a value, then I would like B9 to read "1/16" (year not shown). From
there another cell (A13) would show that day/date as "Sunday, January
01, 2006".

Any help would be greatly appreciated.


--
Barry Clark
------------------------------------------------------------------------
Barry Clark's Profile: http://www.excelforum.com/member.php...o&userid=35267
View this thread: http://www.excelforum.com/showthread...hreadid=555570


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Barry Clark
 
Posts: n/a
Default Date referencing


Thanks.

I tried that and it didn't work.

What I have is:

B7 = "January"
C7 = "1"
G7 = "2006"

Those three cells are formatted as Text.

B9 = "=DATE(YEAR(G7),MONTH(B7),DAY(C7))"

That cell is formatted as a date.

My return is "#value"

I have every add-in installed.


--
Barry Clark
------------------------------------------------------------------------
Barry Clark's Profile: http://www.excelforum.com/member.php...o&userid=35267
View this thread: http://www.excelforum.com/showthread...hreadid=555570

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Franz Verga
 
Posts: n/a
Default Date referencing

Barry Clark wrote:
Hello all. I am still trying to get this timesheet where I want it.

This is where I am at:

I have a cell that mentions the year (G7) and the sheet mentions the
pay period beginning (ex: January 1).

I would like to have a different cell (B9) combine the two into a date
that other cells would recognize as such.

For instance, if the sheet name is January 1st and cell G7 has "2006"
as a value, then I would like B9 to read "1/16" (year not shown). From
there another cell (A13) would show that day/date as "Sunday, January
01, 2006".

Any help would be greatly appreciated.




If your sheet is named "January 1st" (without quote) you can have this
formula in a cell, assume this cell would be E14, to extract the name of the
sheet:

=RIGHT(CELL("filename",$A$1),LEN(CELL("filename",$ A$1))-FIND("]",CELL("filename",$A$1)))


then if in G7 you have the year, you can combine in a new cell ,say G9 to
have your starting date:


=VALUE("1/"&LEFT(E14,FIND(" ",E14)-1)&"/"&G7)

remember to format G9 as a date.

--
Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Barry Clark
 
Posts: n/a
Default Date referencing


AWESOME, FRANZ!

Another question, your formula -
*"=RIGHT(CELL("filename",$A$1),LEN(CELL("filename" ,$
A$1))-FIND("]",CELL("filename",$A$1)))
"*- has the Month and the Day showing just as the sheet name does. I
have noticed that formatting the cell does not effect the way the
information in the cell is displayed. Why is that?

Thank you,

Barry


--
Barry Clark
------------------------------------------------------------------------
Barry Clark's Profile: http://www.excelforum.com/member.php...o&userid=35267
View this thread: http://www.excelforum.com/showthread...hreadid=555570



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Franz Verga
 
Posts: n/a
Default Date referencing

Barry Clark wrote:
AWESOME, FRANZ!

Another question, your formula -
*"=RIGHT(CELL("filename",$A$1),LEN(CELL("filename" ,$
A$1))-FIND("]",CELL("filename",$A$1)))
"*- has the Month and the Day showing just as the sheet name does. I
have noticed that formatting the cell does not effect the way the
information in the cell is displayed. Why is that?


Because it's text, not date...


--
(I'm not sure of names of menus, options and commands, because
translating from the Italian version of Excel...)

Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy


  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Bernard Liengme
 
Posts: n/a
Default Date referencing

Hi Barry,
This UDF will give what you need in B9

Function MyDate()
Application.Volatile
MySheet = ActiveSheet.Name
MyMonth = Mid(MySheet, 1, 3)
Select Case MyMonth
Case "Jan"
Mynumber = 1
Case "Feb"
Mynumber = 2
Case "Mar"
Mynumber = 3
Case "Apr"
Mynumber = 4
Case "May"
Mynumber = 5
Case "Jun"
Mynumber = 6
Case "Jul"
Mynumber = 7
Case "Aug"
Mynumber = 8
Case "Sep"
Mynumber = 9
Case "Oct"
Mynumber = 10
Case "Nov"
Mynumber = 11
Case "Dec"
Mynumber = 12
End Select

MyStart = WorksheetFunction.Find(" ", MySheet) + 1
MyTest = (Mid(MySheet, MyStart, 1))
If IsNumeric(MyTest) Then
MyDay = MyTest
End If
MyTest = Mid(MySheet, MyStart, 2)
If IsNumeric(MyTest) Then
MyDay = MyTest
End If
MyDate = Mynumber & "/" & MyDay

End Function


And this will give what you need in A13
=DATE(G7,VALUE(MID(B9,1,FIND("/",B9)-1)),VALUE(MID(B9,1,FIND("/",B9)-1)))

best wishes
--
Bernard V Liengme
www.stfx.ca/people/bliengme
remove caps from email

"Barry Clark"
wrote in message
...

Hello all. I am still trying to get this timesheet where I want it.

This is where I am at:

I have a cell that mentions the year (G7) and the sheet mentions the
pay period beginning (ex: January 1).

I would like to have a different cell (B9) combine the two into a date
that other cells would recognize as such.

For instance, if the sheet name is January 1st and cell G7 has "2006"
as a value, then I would like B9 to read "1/16" (year not shown). From
there another cell (A13) would show that day/date as "Sunday, January
01, 2006".

Any help would be greatly appreciated.


--
Barry Clark
------------------------------------------------------------------------
Barry Clark's Profile:
http://www.excelforum.com/member.php...o&userid=35267
View this thread: http://www.excelforum.com/showthread...hreadid=555570



  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Barry Clark
 
Posts: n/a
Default Date referencing


Can I convert it to a date?
Franz Verga Wrote:
Barry Clark wrote:
AWESOME, FRANZ!

Another question, your formula -
*"=RIGHT(CELL("filename",$A$1),LEN(CELL("filename" ,$
A$1))-FIND("]",CELL("filename",$A$1)))
"*- has the Month and the Day showing just as the sheet name does. I
have noticed that formatting the cell does not effect the way the
information in the cell is displayed. Why is that?


Because it's text, not date...


--
(I'm not sure of names of menus, options and commands, because
translating from the Italian version of Excel...)

Hope I helped you.

Thanks in advance for your feedback.

Ciao

Franz Verga from Italy



--
Barry Clark
------------------------------------------------------------------------
Barry Clark's Profile: http://www.excelforum.com/member.php...o&userid=35267
View this thread: http://www.excelforum.com/showthread...hreadid=555570

  #9   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Barry Clark
 
Posts: n/a
Default Date referencing


OK, I used DATEVALUE to convert it the text to a date. However, I would
really like a cell format that showed only the month values as January,
February and so on. I didn't see one in my list of options. Is there a
way that I can create a custom one?

Thank you,
Barry


--
Barry Clark
------------------------------------------------------------------------
Barry Clark's Profile: http://www.excelforum.com/member.php...o&userid=35267
View this thread: http://www.excelforum.com/showthread...hreadid=555570

  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Barry Clark
 
Posts: n/a
Default Date referencing


Nevermind, guys. I got it. Thanks.


--
Barry Clark
------------------------------------------------------------------------
Barry Clark's Profile: http://www.excelforum.com/member.php...o&userid=35267
View this thread: http://www.excelforum.com/showthread...hreadid=555570



  #11   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Barry Clark
 
Posts: n/a
Default Date referencing


OK, here is another one.

I would like to combine the sheet name and a cell value to equal a full
date. All in one cell.

I have the month and day part. That isn't a problem at all. For that, I
used a modified version of Franz's formula
Code:
--------------------
=DATEVALUE(RIGHT(CELL("filename",$A$1),LEN(CELL("f ilename",$A$1))-FIND("]",CELL("filename",$A$1))))
--------------------


This gives me whatever the sheet name is formatted as a date. However,
I would also like it to reference a cell for the year value.

Basically, I would like it reference G7 for the year portion of the
date. I have tried a few things but have not been successful in a
method. The last one I tried was to add
Code:
--------------------
&"/"&G7
--------------------
to the end of the code. Needless to say, it failed.

Thanks for all the help guys.


--
Barry Clark
------------------------------------------------------------------------
Barry Clark's Profile: http://www.excelforum.com/member.php...o&userid=35267
View this thread: http://www.excelforum.com/showthread...hreadid=555570

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
Date format issue CindyLF1 New Users to Excel 3 June 12th 06 06:18 PM
Need to Improve Code Copying/Pasting Between Workbooks David Excel Discussion (Misc queries) 1 January 6th 06 03:56 AM
Adding XY days to date in cells satucha Excel Discussion (Misc queries) 1 November 25th 05 08:02 AM
Another Date issue. TimM Excel Worksheet Functions 1 November 17th 05 01:58 AM
Need help troubleshooting an array formula XLXP on Win2K KR Excel Worksheet Functions 1 December 13th 04 07:41 PM


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