A question about Cells & finding the Week

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!
 
T

Tom Ogilvy

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
 
T

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.
 
P

Pokey*

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?
 
T

Tom Ogilvy

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.
 

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