LectorFiel
New Member
- Joined
- Apr 11, 2015
- Messages
- 15
Dear Experts,
I am using a function Index and Match to get a value from a Table that contains some Fees.
In order to identify the right Fee, I am looking using three criteria. When I used two criteria it works, partially because I do not get error but the result is not correct totally , later I added the third one try to get the right data, but I got an Error #N/A.
Table1
Client Start date End Date Fee1
AAA 1/1/2016 12/31/2016 1
AAA 1/1/2017 12/31/2017 1.5
AAA 1/1/2018 12/31/2018 2
In Another Sheet, I have Client and Date, on this way.
Client 1/1/2016 1/1/2016 2/1/2016 3/1/2016 1/1/2017 2/1/2018
AAA X X X X
AAA
AAA
BBB
BBB
CCC
The function I am using is this : =INDEX(Table1[Fee1],MATCH(1,(Table1[Client]=$A2)*(Table1[Start Date]>=B$1),0)) and press Ctrl + Shift + Enter
This brings the first data correct when Client and Date are the same, but when date is different results belong to the next range. Which It is Wrong.
I Thought that if I add a third criteria, wondering if date is between Start Date and End Date, will help me to get the right data, but I got an Error.
=INDEX(Table1[Fee1],MATCH(1,(Table1[Client]=$A2)*(Table1[Start Date]>=B$1)*(Table1[End Date]>B$1),0)) and [FONT=arial, sans-serif]press Ctrl + Shift + Enter[/FONT]
[FONT=arial, sans-serif]I got and Error #N/A.[/FONT]
[FONT=arial, sans-serif]I appreciate your help in this matter, looks that it is easy but I really spend a lot of hours and nothing.[/FONT]
[FONT=arial, sans-serif]Thanks for your collaboration.[/FONT]
I am using a function Index and Match to get a value from a Table that contains some Fees.
In order to identify the right Fee, I am looking using three criteria. When I used two criteria it works, partially because I do not get error but the result is not correct totally , later I added the third one try to get the right data, but I got an Error #N/A.
Table1
Client Start date End Date Fee1
AAA 1/1/2016 12/31/2016 1
AAA 1/1/2017 12/31/2017 1.5
AAA 1/1/2018 12/31/2018 2
In Another Sheet, I have Client and Date, on this way.
Client 1/1/2016 1/1/2016 2/1/2016 3/1/2016 1/1/2017 2/1/2018
AAA X X X X
AAA
AAA
BBB
BBB
CCC
The function I am using is this : =INDEX(Table1[Fee1],MATCH(1,(Table1[Client]=$A2)*(Table1[Start Date]>=B$1),0)) and press Ctrl + Shift + Enter
This brings the first data correct when Client and Date are the same, but when date is different results belong to the next range. Which It is Wrong.
I Thought that if I add a third criteria, wondering if date is between Start Date and End Date, will help me to get the right data, but I got an Error.
=INDEX(Table1[Fee1],MATCH(1,(Table1[Client]=$A2)*(Table1[Start Date]>=B$1)*(Table1[End Date]>B$1),0)) and [FONT=arial, sans-serif]press Ctrl + Shift + Enter[/FONT]
[FONT=arial, sans-serif]I got and Error #N/A.[/FONT]
[FONT=arial, sans-serif]I appreciate your help in this matter, looks that it is easy but I really spend a lot of hours and nothing.[/FONT]
[FONT=arial, sans-serif]Thanks for your collaboration.[/FONT]