Please Help

M

marine247

Hello and thank you to all that answer questions for us newbies. My question
is, I am now in charge to make employee schedules. What i would like to do
is, make a schedule with the employee names on the left column, the month
we're in in the upper-left corner and the dates on that same row. Now, my
question is: Is there anyway to give, for example 8-12 and 2-7:30, a letter
equivalent. Such as, D= 8-12 and 2-7:30 OR E= 1:30 - Close. I want to make my
schedule look like this: (example)

MARCH MONDAY 16 TUESDAY 17

BOB D E

JEFF E D

Where, D and E will automatically be replaced with the times. Now, if this
isn't possible in Excel, do you recommend a program to use? Thank you for
your time.
 
S

Simon Lloyd

If you want to enter the letter in a cell and that cell convert the
letter to a time you are going to need to use VBA, right click the
workcheet tab and choose view code then paste this in, change the range
to suit:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("B2:Z100")) Is Nothing Then
Select Case Target
Case Is = "C"
Target = "8-12"
Case Is = "D"
Target = "2-7:30"
Case Is = "E"
Target = "1:30 - Close"
End Select
End If
End Sub

marine247;260278 said:
Hello and thank you to all that answer questions for us newbies. My
question
is, I am now in charge to make employee schedules. What i would like to
do
is, make a schedule with the employee names on the left column, the
month
we're in in the upper-left corner and the dates on that same row. Now,
my
question is: Is there anyway to give, for example 8-12 and 2-7:30, a
letter
equivalent. Such as, D= 8-12 and 2-7:30 OR E= 1:30 - Close. I want to
make my
schedule look like this: (example)

MARCH MONDAY 16 TUESDAY 17

BOB D E

JEFF E D

Where, D and E will automatically be replaced with the times. Now, if
this
isn't possible in Excel, do you recommend a program to use? Thank you
for
your time.


--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
 
M

marine247

Now, I sincerely appreciate the help but, how do i get to that screen on
Excel 2007? I mean, I am as new of a newbie to say the least. Sorry.
 
M

marine247

Ok. I found the VBA thing. Thank you very much

Simon Lloyd said:
If you want to enter the letter in a cell and that cell convert the
letter to a time you are going to need to use VBA, right click the
workcheet tab and choose view code then paste this in, change the range
to suit:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Cells.Count > 1 Then Exit Sub
If Not Intersect(Target, Range("B2:Z100")) Is Nothing Then
Select Case Target
Case Is = "C"
Target = "8-12"
Case Is = "D"
Target = "2-7:30"
Case Is = "E"
Target = "1:30 - Close"
End Select
End If
End Sub




--
Simon Lloyd

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com)
 
S

Shane Devenshire

Hi,

My question is what exactly do you want to display in the cells? D= 8-12 and
2-7:30
Remember that "8-12 and 2-7:30" is not a time, it is text.

You can define names D to be equal to "8-12 and 2-7:30" and then instead of
typing D into the cell you just type =D in.
 
S

Shane Devenshire

Hi,

To name a constant choose Formulas, Define Name and enter D in the Name box
and ="8-12 and 2-7:30" into the Refers to box. repeat for E.

Move to a cell and type =D or =E
 
S

Simon Lloyd

Mariane, if you are not comfortable with VBA Shane's solution would sui
you best for your situation as changing the times and things you wan
displayed will be a lot simpler, also using NAME like that means it
available in every worksheet, whereas the code i supplied specificall
works only with the worksheet it is placed in
Hi

To name a constant choose Formulas, Define Name and enter D in the Nam
bo
and ="8-12 and 2-7:30" into the Refers to box. repeat for E

Move to a cell and type =D or =

-
If this helps, please click the Yes button

Cheers
Shane Devenshir

--
Simon Lloy

Regards,
Simon Lloyd
'The Code Cage' (http://www.thecodecage.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top