Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Greetings,
I have three cells. The first (A1) has a month listing and the second (B1) has a year listing. I have CommandButtons to change the months and the years, just not the code to make them work. Any help would be appreciated. TIA -Minitman |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Minitman wrote:
I have three cells. The first (A1) has a month listing and the second (B1) has a year listing. I have CommandButtons to change the months and the years, just not the code to make them work. Is your question what to do with months 12?: NewYear = OldYear + AddYears + (OldMonth + AddMonths-1) \ 12 NewMonth = 1 + (OldMonth + AddMonths - 1) mod 12 or, if you've already got the old..+add..= new.. NewYear = NewYear + (NewMonth-1) \ 12 NewMonth = 1 + (NewMonth - 1) mod 12 ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 100,000 Newsgroups ---= East/West-Coast Server Farms - Total Privacy via Encryption =--- |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks Dave,
I appreciate the reply, but that's not what I was looking for. It turns out all I needed was to look deeper into the TEXT() command and I came up with this where E3 is the date entry cell: =TEXT(E3+30, "mmm")&" 20, "&TEXT(E3+30, "yyyy") -Minitman On Sun, 16 Jan 2005 20:39:32 -0800, Dave D-C wrote: Minitman wrote: I have three cells. The first (A1) has a month listing and the second (B1) has a year listing. I have CommandButtons to change the months and the years, just not the code to make them work. Is your question what to do with months 12?: NewYear = OldYear + AddYears + (OldMonth + AddMonths-1) \ 12 NewMonth = 1 + (OldMonth + AddMonths - 1) mod 12 or, if you've already got the old..+add..= new.. NewYear = NewYear + (NewMonth-1) \ 12 NewMonth = 1 + (NewMonth - 1) mod 12 ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 100,000 Newsgroups ---= East/West-Coast Server Farms - Total Privacy via Encryption =--- |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
=Text(Date(year(e3),month(e3)+1,20),"mmm d, yyyy")
might be another way. -- Regards, Tom Ogilvy "Minitman" wrote in message ... Thanks Dave, I appreciate the reply, but that's not what I was looking for. It turns out all I needed was to look deeper into the TEXT() command and I came up with this where E3 is the date entry cell: =TEXT(E3+30, "mmm")&" 20, "&TEXT(E3+30, "yyyy") -Minitman On Sun, 16 Jan 2005 20:39:32 -0800, Dave D-C wrote: Minitman wrote: I have three cells. The first (A1) has a month listing and the second (B1) has a year listing. I have CommandButtons to change the months and the years, just not the code to make them work. Is your question what to do with months 12?: NewYear = OldYear + AddYears + (OldMonth + AddMonths-1) \ 12 NewMonth = 1 + (OldMonth + AddMonths - 1) mod 12 or, if you've already got the old..+add..= new.. NewYear = NewYear + (NewMonth-1) \ 12 NewMonth = 1 + (NewMonth - 1) mod 12 ----== Posted via Newsfeeds.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeeds.com The #1 Newsgroup Service in the World! 100,000 Newsgroups ---= East/West-Coast Server Farms - Total Privacy via Encryption =--- |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Date(Year,Month,Day) not returnign correct date | Excel Discussion (Misc queries) | |||
count month when date is in day/month/year format | Excel Worksheet Functions | |||
Tell me which "season" (Month/Day through Month/Day) a date(Month/Day/Year) falls in (any year)??? | Excel Discussion (Misc queries) | |||
how to creat a formula to advance date by one year | Excel Worksheet Functions | |||
Sort month/date/year data using month and date only | Excel Discussion (Misc queries) |