ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   A question about Cells & finding the Week (https://www.excelbanter.com/excel-programming/308415-question-about-cells-finding-week.html)

Pokey*

A question about Cells & finding the Week
 
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!

Tom Ogilvy

A question about Cells & finding the Week
 
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
"Pokey*" wrote in message
...
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!




Tom Ogilvy

A question about Cells & finding the Week
 
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.

--
Regards,
Tom Ogilvy

"Pokey*" wrote in message
...
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!




Pokey*[_2_]

A question about Cells & finding the Week
 
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?


-----Original Message-----
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!
.


Tom Ogilvy

A question about Cells & finding the Week
 
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.

--
Regards,
Tom Ogilvy

"Pokey*" wrote in message
...
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?


-----Original Message-----
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!
.





All times are GMT +1. The time now is 07:35 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com