Two Formatting Questions

T

Tom K

I haven't seen these answered in earlier posts. Would appreciate any
suggestions:

1) I am adding a date in the "right align" box in a custom header. The
format defaults to 2/20/2006. I would like to format it as 2-Feb-2006. I
can't find a way to do this. The box now contains &[Date]. Do I put
something else in there to trigger the right formatting?

2) I have draw a rectangular box around a portion of a spreadsheet that has
contents in the cells. I would like the box to be yellow fill and with a
shadow. I am using the draw commands to try and "push" the box to the
background, I can't get the box to sit "behind" the cell contents so that
the cell contents are visible.

Thanks,
Tom
 
M

Mark Lincoln

For your second problem, you could color the cells in question with
yellow, draw a box around them with no fill (letting the yellow show
through), then draw boxes filled with black on the sides that need
shadows. You'll have full control over how your shadows look.
 
C

CLR

1) You can put the date in whatever format you wish, just by typing it in
the header box and not using the &[Date] button

2) You can color a group of cells and then do a Border arount the outside of
all of them, and that Border will then take a Shadow as applied from the
Drawing Toolbar.

Vaya con Dios,
Chuck, CABGx3
 
R

Ron Rosenfeld

I haven't seen these answered in earlier posts. Would appreciate any
suggestions:

1) I am adding a date in the "right align" box in a custom header. The
format defaults to 2/20/2006. I would like to format it as 2-Feb-2006. I
can't find a way to do this. The box now contains &[Date]. Do I put
something else in there to trigger the right formatting?

Not quite sure how you get 2/20/2006 to read 2-Feb-2006 but probably you meant
20-Feb-2006.

You need to use VBA to do this.

Right click on the sheet tab and select View Code.

In the Properties Window, select This Workbook from the Project you wish to do
this.

Paste code similar to the following into the window that opens:

===========================
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Worksheets("Sheet1").PageSetup.RightHeader = Format(Date, "d-mmm-yyyy")
End Sub
=======================

Change "Sheet1" to reflect the name of the sheet you want to do this to.

Or, if there are multiple sheets, you could use something like:

===========================
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim ws As Worksheet

For Each ws In Worksheets
ws.PageSetup.RightHeader = Format(Date, "d-mmm-yyyy")
Next ws

End Sub
======================
--ron
 
T

Tom K

Ron:

Many thanks. Your solution worked great!

Tom

Ron Rosenfeld said:
I haven't seen these answered in earlier posts. Would appreciate any
suggestions:

1) I am adding a date in the "right align" box in a custom header. The
format defaults to 2/20/2006. I would like to format it as 2-Feb-2006. I
can't find a way to do this. The box now contains &[Date]. Do I put
something else in there to trigger the right formatting?

Not quite sure how you get 2/20/2006 to read 2-Feb-2006 but probably you
meant
20-Feb-2006.

You need to use VBA to do this.

Right click on the sheet tab and select View Code.

In the Properties Window, select This Workbook from the Project you wish
to do
this.

Paste code similar to the following into the window that opens:

===========================
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Worksheets("Sheet1").PageSetup.RightHeader = Format(Date, "d-mmm-yyyy")
End Sub
=======================

Change "Sheet1" to reflect the name of the sheet you want to do this to.

Or, if there are multiple sheets, you could use something like:

===========================
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim ws As Worksheet

For Each ws In Worksheets
ws.PageSetup.RightHeader = Format(Date, "d-mmm-yyyy")
Next ws

End Sub
======================
--ron
 
T

Tom K

Chuck:

I think a variation on your suggestion will work just fine. Thanks for the
idea.

Tom

CLR said:
1) You can put the date in whatever format you wish, just by typing it in
the header box and not using the &[Date] button

2) You can color a group of cells and then do a Border arount the outside
of
all of them, and that Border will then take a Shadow as applied from the
Drawing Toolbar.

Vaya con Dios,
Chuck, CABGx3


Tom K said:
I haven't seen these answered in earlier posts. Would appreciate any
suggestions:

1) I am adding a date in the "right align" box in a custom header. The
format defaults to 2/20/2006. I would like to format it as 2-Feb-2006. I
can't find a way to do this. The box now contains &[Date]. Do I put
something else in there to trigger the right formatting?

2) I have draw a rectangular box around a portion of a spreadsheet that has
contents in the cells. I would like the box to be yellow fill and with a
shadow. I am using the draw commands to try and "push" the box to the
background, I can't get the box to sit "behind" the cell contents so that
the cell contents are visible.

Thanks,
Tom
 
R

Ron Rosenfeld

You're welcome. Glad to help. Thanks for the feedback.



Ron:

Many thanks. Your solution worked great!

Tom

Ron Rosenfeld said:
I haven't seen these answered in earlier posts. Would appreciate any
suggestions:

1) I am adding a date in the "right align" box in a custom header. The
format defaults to 2/20/2006. I would like to format it as 2-Feb-2006. I
can't find a way to do this. The box now contains &[Date]. Do I put
something else in there to trigger the right formatting?

Not quite sure how you get 2/20/2006 to read 2-Feb-2006 but probably you
meant
20-Feb-2006.

You need to use VBA to do this.

Right click on the sheet tab and select View Code.

In the Properties Window, select This Workbook from the Project you wish
to do
this.

Paste code similar to the following into the window that opens:

===========================
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Worksheets("Sheet1").PageSetup.RightHeader = Format(Date, "d-mmm-yyyy")
End Sub
=======================

Change "Sheet1" to reflect the name of the sheet you want to do this to.

Or, if there are multiple sheets, you could use something like:

===========================
Private Sub Workbook_BeforePrint(Cancel As Boolean)
Dim ws As Worksheet

For Each ws In Worksheets
ws.PageSetup.RightHeader = Format(Date, "d-mmm-yyyy")
Next ws

End Sub
======================
--ron

--ron
 
Top