SydneyGeek
MrExcel MVP
- Joined
- Aug 5, 2003
- Messages
- 12,251
Hi, I have a DLOOKUP question. How do you set up DLOOKUP to work like VLOOKUP in Excel, or don't you?
Example:
Table1 -- Levy
EffectiveDate LevyRate
1-Jan-02 2%
1-Jan-03 4%
1-Jan-04 3.5%
Table2
TransDate Other Fields
Range of transactions, varying dates.
I'd like to build an expression to place the correct effective dates against each transaction date. Have tried
=DLookUp("[LevyRate]","Levy","[Effective Date] >=" & [Transdate])
=DLookUp("[LevyRate]","Levy","[Effective Date] >=" & "[Transdate]")
=DLookUp("[LevyRate]","Levy","[Effective Date] >= [Transdate]")
I think the first option is closest, but still no dice -- I get 0 values for all records. Can the > or >= operators be used with DLOOKUP, or do I need another approach?
Thanks in advance
Denis
Example:
Table1 -- Levy
EffectiveDate LevyRate
1-Jan-02 2%
1-Jan-03 4%
1-Jan-04 3.5%
Table2
TransDate Other Fields
Range of transactions, varying dates.
I'd like to build an expression to place the correct effective dates against each transaction date. Have tried
=DLookUp("[LevyRate]","Levy","[Effective Date] >=" & [Transdate])
=DLookUp("[LevyRate]","Levy","[Effective Date] >=" & "[Transdate]")
=DLookUp("[LevyRate]","Levy","[Effective Date] >= [Transdate]")
I think the first option is closest, but still no dice -- I get 0 values for all records. Can the > or >= operators be used with DLOOKUP, or do I need another approach?
Thanks in advance
Denis