I have data that contains all the days in a year G7:I372. I want to lookup a value based on month, date and return the result. The sheet I am using contains a list in A3. As I change the value of A3, i want the dates to update. See attached sheet.
I have data that contains all the days in a year G7:I372. I want to lookup a value based on month, date and return the result. The sheet I am using contains a list in A3. As I change the value of A3, i want the dates to update. See attached sheet.
Last edited by faucetguru; 03-12-2009 at 04:57 PM.
You're going a long way for something as simple "create a listing of all valid dates in a month". You don't really need that chart in G H and I. All you need is a simple conversion chart (I added it in columns L M) to reference your "text" months as numbers.
In the attached, both columns A and B operate off of the reference in A3 only and the small chart. The months will end where they need to, even on leap years. Be careful with the dates 29,30 and 31, those formulas are slightly different.
You can do away with all that extra stuff..unless it serves some purpose you've not explained.
In truth, you don't really need the A column either...
Last edited by JBeaucaire; 03-12-2009 at 03:02 AM.
_________________
Microsoft MVP 2010 - Excel
Visit: Jerry Beaucaire's Excel Files & Macros
If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
Always put your code between code tags. [CODE] your code here [/CODE]
?None of us is as good as all of us? - Ray Kroc
?Actually, I *am* a rocket scientist.? - JB (little ones count!)
JB, you could extend further and dispense with lookup table altogether using DATEVALUE, eg:
B8: =DATEVALUE("1"&$A$3)
My Recommended Reading:
Volatility
Sumproduct & Arrays
Pivot Intro
Email from XL - VBA & Outlook VBA
Function Dictionary & Function Translations
Dynamic Named Ranges
That's a great trick! Nice.
B8: =DATEVALUE("1"&$A$3) was a great solution.
Thanks.
If that takes care of your need, be sure to EDIT your original post (Go Advanced) and mark the PREFIX box [SOLVED]
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks