Thread: date problem
View Single Post
  #11   Report Post  
Posted to microsoft.public.excel.misc
Stefi Stefi is offline
external usenet poster
 
Posts: 2,646
Default date problem

Range("C1").Value = IIf(IsEmpty(Target), "", "Today is " &
UCase(Format(Date, "dddd dd.mm.yyyy")))
Stefi

€˛puiuluipui€¯ ezt Ć*rta:

IT'S WORKING.
BUT, I PROMISS, IT'S THE LAST QUESTION

If i delete the data from C8 the formula its still in C1. I use this
workbook every week, and at the begining of each week i make a copy and clear
the data from it.
Can the datas from the C1 dissapear when i clear the C8 cell?
Thanks allot.

"Stefi" a scris:

Range("C1").Value = "Today is " & Ucase(Format(Date, "dddd dd.mm.yyyy"))
Stefi


€˛puiuluipui€¯ ezt Ć*rta:

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(False, False) = "C8" Then _
Range("C1").Value = "Today is " & Format(Date, "dddd dd.mm.yyyy")
End Sub

Stefi, can the day be with upper case? (MONDAY, FRIDAY...ETC?)




THANKS
"Stefi" a scris:

You are welcome! Thanks for the feedback!
Stefi

€˛puiuluipui€¯ ezt Ć*rta:

IT'S WORKING GREAT!

Thanks allot.

"Stefi" a scris:

Try to insert this in the workbook code window (it supposes that cell in the
last written row in column A is not empty):

Private Sub Workbook_BeforePrint(Cancel As Boolean)
lastrow = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
ActiveSheet.PageSetup.PrintArea = "$A$3:$F$" & lastrow
End Sub

Regards,
Stefi

€˛puiuluipui€¯ ezt Ć*rta:

THANKS MIKE, STEFI, IT'S WORKING. BOTH OF THEM.

I have one more problem. I need to print the worksheet but i need the macro
to autoajust the print area. I need to print 6 columns from A3 till the last
written row.

I don't want to set a print area, i just want to automatically print the
worksheet. Sometimes the worksheet has 10 rows and sometimes 100 rows.
Can you help me?
THANKS ALLOT