A question about Cells & finding the Week

  • Thread starter Thread starter Pokey*
  • Start date Start date
P

Pokey*

Is there a way to format the worksheet so if I type 10
numbers in A1, that it automatically tabs over to C1?
And then repeat the process on the next row within a
certain range?

Also, can you find the Week of a certain date with simple
code? I have a complex formula that works, but isn't
there a way similar to Month(Date)?

Thanks again!
 
Dim TheDate As Date ' Declare variables.
Dim Msg
TheDate = InputBox("Enter a date:")
Msg = "Week: " & DatePart("ww", TheDate)
MsgBox MsgBut there are varying definitions of the week number. You might
want to look at Chip Pearson's
sitehttp://www.cpearson.com/excel/weeknum.htm-- Regards,Tom Ogilvy
 
Select the cells that you want to enter data into in the order you want to
move through them. Then use the tab key to go in that order.

If you will do this often, once selected, then go to the name box and type
in a name. then when you want to fill in these cells, go to the name box,
hit the dropdown and select your named range.
 
Regarding the second question, are there Private Subs
that can be programmed for a specific cell or change in a
specific cell, i.e., if A1 changes, run that macro?
 
You can always make a UDF volatile.

However, if you are using the function in the worksheet, the analysis
toolpak already offers a weeknum function - although, again, look at Chip
Pearson's page on week numbers.
 
Back
Top