Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I have a workbook that is used throughout the company.
My boss wants to report on certain fields based on month. The only problem is that all cells with a date in them are all mm/dd/yy. I want to present my boss with a userform that will ask her what month she wants, then go to any worksheet and get the information she needs. How can I query the date cells with only a 2 digit month? Thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() From the UserForm take the month number say in ReportMonth variable Test this against the value in the cell (eg A1) holding the date for selection using If ReportMonth = Month(Range("A1")) Then ' do code - the month matches End If Cheers N "John R." wrote in message ... Hi, I have a workbook that is used throughout the company. My boss wants to report on certain fields based on month. The only problem is that all cells with a date in them are all mm/dd/yy. I want to present my boss with a userform that will ask her what month she wants, then go to any worksheet and get the information she needs. How can I query the date cells with only a 2 digit month? Thanks ----== Posted via Newsfeed.Com - Unlimited-Uncensored-Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi again, but the current content of the cell is say
11/21/03, and the next cell in the column is 11/25/03, the next cell might be 07/30/02. How do I only get rows in which the month is 11? Sorry I'm new to VB and don't quite understand the code you have written. -----Original Message----- From the UserForm take the month number say in ReportMonth variable Test this against the value in the cell (eg A1) holding the date for selection using If ReportMonth = Month(Range("A1")) Then ' do code - the month matches End If Cheers N "John R." wrote in message ... Hi, I have a workbook that is used throughout the company. My boss wants to report on certain fields based on month. The only problem is that all cells with a date in them are all mm/dd/yy. I want to present my boss with a userform that will ask her what month she wants, then go to any worksheet and get the information she needs. How can I query the date cells with only a 2 digit month? Thanks ----== Posted via Newsfeed.Com - Unlimited-Uncensored- Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- . |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I guess I should also tell you that I'm storing the month
she picks into x1 of my worksheet, I then have to query a closed workbook to get the information for the month she has picked. I'm also using Excel 97 on a Win2k machine. -----Original Message----- Hi again, but the current content of the cell is say 11/21/03, and the next cell in the column is 11/25/03, the next cell might be 07/30/02. How do I only get rows in which the month is 11? Sorry I'm new to VB and don't quite understand the code you have written. -----Original Message----- From the UserForm take the month number say in ReportMonth variable Test this against the value in the cell (eg A1) holding the date for selection using If ReportMonth = Month(Range("A1")) Then ' do code - the month matches End If Cheers N "John R." wrote in message ... Hi, I have a workbook that is used throughout the company. My boss wants to report on certain fields based on month. The only problem is that all cells with a date in them are all mm/dd/yy. I want to present my boss with a userform that will ask her what month she wants, then go to any worksheet and get the information she needs. How can I query the date cells with only a 2 digit month? Thanks ----== Posted via Newsfeed.Com - Unlimited-Uncensored- Secure Usenet News==---- http://www.newsfeed.com The #1 Newsgroup Service in the World! 100,000 Newsgroups ---= 19 East/West-Coast Specialized Servers - Total Privacy via Encryption =--- . . |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
John
You might find that an advanced filter is what you need. See Deborah Dalgliesh's site Contextures.com The criterion to filter November's data would be =MONTH(A11)=11 if the dates are in column 1 and the list starts at row 11. You can use an inputBox for the manager to to insert the month number with somthing like x = Inputbox("Enter the number of the month") range("a2")= "=MONTH(A11)=x" Deborah shows how to extract certain fields to another place Peter Atherton -----Original Message----- Hi, I have a workbook that is used throughout the company. My boss wants to report on certain fields based on month. The only problem is that all cells with a date in them are all mm/dd/yy. I want to present my boss with a userform that will ask her what month she wants, then go to any worksheet and get the information she needs. How can I query the date cells with only a 2 digit month? Thanks . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
cell formatted as date won't change | Excel Discussion (Misc queries) | |||
Extract the Month from a cell with a formatted date | Excel Discussion (Misc queries) | |||
Split date from date time cells dd/mm/yyyy hh:mm. New cell dd/mm/y | Excel Discussion (Misc queries) | |||
Extracting date from Date and Time formatted cell | Excel Discussion (Misc queries) | |||
how do i add 1 year to a date formatted cell? | Excel Worksheet Functions |