Hello Experts
I will like to see if anyone can help me simplify a formula that I just manage to getter bigger and bigger and I know it may be an easier way
I have a file that we paid commissions and under the file there a date column so I create a formula to lookup that value and return the price,
=IF(AND(Query1[@[Invc Date]]>=Comm!A:A,Query1[@[Invc Date]]<=Comm!B:B),IFERROR(VLOOKUP(CONCATENATE(Query1[@Slsprs],Query1[@Item]),Comm!$C:$G,5,0),"0"),"0")
I manage to freeze the value and here is where I need the help as the comm changes I have to paste new value and freeze the new date and so on, but I will like to see it is the formula that will look the value for the right date column and the left date column and if is in between does dates then lookup the values under that criteria.
this is an example of 1 product with different prices and dates
Colum A Colum B Column C Column D Column E Column F
[TABLE="width: 831"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD="align: right"]
[TABLE="width: 831"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD="align: right"]
4/17/2018[/TD]
[TD="align: right"]5/29/2018[/TD]
[TD]ANTHONY C7551672136002[/TD]
[TD]51672-1360-02[/TD]
[TD]ACYCLOVIR 5% OINTMENT 30 GM 10[/TD]
[/TR]
[TR]
[TD="align: right"]5/30/2018[/TD]
[TD="align: right"]6/18/2018[/TD]
[TD]ANTHONY C7551672136002[/TD]
[TD]51672-1360-02[/TD]
[TD]ACYCLOVIR 5% OINTMENT 30 GM 15[/TD]
[/TR]
[TR]
[TD="align: right"]6/19/2018[/TD]
[TD="align: right"]7/23/2018[/TD]
[TD]ANTHONY C7551672136002[/TD]
[TD]51672-1360-02[/TD]
[TD]ACYCLOVIR 5% OINTMENT 30 GM 20
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD]
[/TD]
[/TR]
</tbody>[/TABLE]
I will like to see if anyone can help me simplify a formula that I just manage to getter bigger and bigger and I know it may be an easier way
I have a file that we paid commissions and under the file there a date column so I create a formula to lookup that value and return the price,
=IF(AND(Query1[@[Invc Date]]>=Comm!A:A,Query1[@[Invc Date]]<=Comm!B:B),IFERROR(VLOOKUP(CONCATENATE(Query1[@Slsprs],Query1[@Item]),Comm!$C:$G,5,0),"0"),"0")
I manage to freeze the value and here is where I need the help as the comm changes I have to paste new value and freeze the new date and so on, but I will like to see it is the formula that will look the value for the right date column and the left date column and if is in between does dates then lookup the values under that criteria.
this is an example of 1 product with different prices and dates
Colum A Colum B Column C Column D Column E Column F
[TABLE="width: 831"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD="align: right"]
[TABLE="width: 831"]
<colgroup><col><col><col><col><col></colgroup><tbody>[TR]
[TD="align: right"]
4/17/2018[/TD]
[TD="align: right"]5/29/2018[/TD]
[TD]ANTHONY C7551672136002[/TD]
[TD]51672-1360-02[/TD]
[TD]ACYCLOVIR 5% OINTMENT 30 GM 10[/TD]
[/TR]
[TR]
[TD="align: right"]5/30/2018[/TD]
[TD="align: right"]6/18/2018[/TD]
[TD]ANTHONY C7551672136002[/TD]
[TD]51672-1360-02[/TD]
[TD]ACYCLOVIR 5% OINTMENT 30 GM 15[/TD]
[/TR]
[TR]
[TD="align: right"]6/19/2018[/TD]
[TD="align: right"]7/23/2018[/TD]
[TD]ANTHONY C7551672136002[/TD]
[TD]51672-1360-02[/TD]
[TD]ACYCLOVIR 5% OINTMENT 30 GM 20
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD="align: right"][/TD]
[TD][/TD]
[TD][/TD]
[TD]
[/TD]
[/TR]
</tbody>[/TABLE]