Hi there,
In an effort to improve the efficiency of my excel model, I am attempting to incorporate the DGET function into an excel table to populate the fiscal year for each record based the date values inputted for each record (our company has a floating year end).
Currently, I am using the SUMPRODUCT to do this:
=SUMPRODUCT(--([@Date]>=WeekLU[Week Starting]),--([@Date]<=WeekLU[Week Ending]),WeekLU[Fiscal Year])
This formula lookups the date of a particular record and returns the appropriate fiscal year based on whether that date falls within the appropriate date range. "WeekLU" is a table that contains the related date ranges and fiscal years. Although this formula works fine, I believe that it is making my model very inefficient.
I have researched ways to improve calculation efficiency and came across the DGET function. However, the issue with using this function to populate a table is that the criteria array needs to be contiguous. What I want to do is use the table header and the date range specific to each record as my criteria range to extract to appropriate fiscal year within the WeekLU table. For example, I have tried using a non-contiguous criteria array by doing the following:
=DGET(WeekLU,"Fiscal Year",$A$1:$B$1&A5:B5)
-Where A1:B1 represents the headers of the table, which are also the fields that I want to evaluate within WeekLU.
-Where A5:B5 represents the date values for one particular record.
This formula returns a #VALUE! error. Is there any way to work around the fact that DGET requires a contiguous criteria array to work?
Any help would be greatly appreciated! Please let me know if I should clarify anything.
Thanks!
Bookmarks