Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello all,
I have the following code and I want to change the format from "mmmm" to "ww" so the cell will display the week of the year. i.e. week 13, week 12 but only the number is needed. i.e. "13". i've tried change the "mmmm" to "ww" but it displays "13" for every date. I have dates from last week and the date for today so i expected to see 12 for the dates from last week and 13 for todays date. Any thoughts? Thanks in advance!! Here's my code.... With Columns(2) Set b = .Find(what:="", after:=Cells(1, 2)) b.Select ActiveSheet.Paste b.Offset(0, -1).Select Selection = b End With Dim sStr As String sStr = Format(Date, "mmmm") With Columns(1) Set a = .Find(what:="", after:=Cells(1, 1)) a.Offset(-1, 0).Select Selection = sStr End With |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Convert Month, Week, Year to date | Excel Worksheet Functions | |||
How do I convert a date to a week of the year? | Excel Discussion (Misc queries) | |||
Finding the date using the number of the week in a year | Excel Worksheet Functions | |||
how to insert month date year and day of week | Excel Discussion (Misc queries) | |||
how to insert month date year and day of week | Excel Worksheet Functions |