Hi,
I am having trouble working the logic for the below scenario:-
I am aiming to achieve a workbook that will automatically tell me what deduction to make if time between two dates is under 2 years (100%), 2-3 years (75%), 3-4 years (50%) and over 4 years (0%).
I have a workbook with a list of dates in column B and column G. Column H has the difference in years, months and days. Column H has the following code:-
=DATEDIF(B7,G7,"y")&" years "&DATEDIF(B7,G7,"ym")&" months "&DATEDIF(B7,G7,"md")&" days"
I am trying to have column I auto populate with the correct deduction depending on the difference between the two dates in column B and G. Table is as follows:-
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[TD]H
[/TD]
[TD]I
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]02/01/2018
[/TD]
[TD]ITEM 1
[/TD]
[TD]105.00
[/TD]
[TD]21.00
[/TD]
[TD]126.0
[/TD]
[TD]14/09/2018
[/TD]
[TD]0 years 8 months 12 days
[/TD]
[TD]100%
[/TD]
[/TR]
</tbody>[/TABLE]
The formula I currently have in I1 is:-
=IF(DATEDIF(B6,TODAY(),"y")<=2,"100%",$T$10)
This gives me the desired result, but it does not change if the dates are changed in column B and G.
I have the following table where the deduction amounts are stored. Ideally I would like the formula to take it's information from here so that changes to deductions can be made in the future.
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]P
[/TD]
[TD]Q
[/TD]
[TD]R
[/TD]
[TD]S
[/TD]
[TD]T
[/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD]Up to 2 Years
[/TD]
[TD][/TD]
[TD]2
[/TD]
[TD]100%
[/TD]
[TD]No Deduction
[/TD]
[/TR]
[TR]
[TD]11
[/TD]
[TD]2-3 years
[/TD]
[TD]2
[/TD]
[TD]3
[/TD]
[TD]75%
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12
[/TD]
[TD]3-4 years
[/TD]
[TD]3
[/TD]
[TD]4
[/TD]
[TD]50%
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13
[/TD]
[TD]Over 4 years
[/TD]
[TD][/TD]
[TD][/TD]
[TD]0%
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I hope this all makes sense. I think I may be using the wrong formulas for this problem.
Any help or advice is very much appreciated.
Thanks,
Pad
I am having trouble working the logic for the below scenario:-
I am aiming to achieve a workbook that will automatically tell me what deduction to make if time between two dates is under 2 years (100%), 2-3 years (75%), 3-4 years (50%) and over 4 years (0%).
I have a workbook with a list of dates in column B and column G. Column H has the difference in years, months and days. Column H has the following code:-
=DATEDIF(B7,G7,"y")&" years "&DATEDIF(B7,G7,"ym")&" months "&DATEDIF(B7,G7,"md")&" days"
I am trying to have column I auto populate with the correct deduction depending on the difference between the two dates in column B and G. Table is as follows:-
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]B
[/TD]
[TD]C
[/TD]
[TD]D
[/TD]
[TD]E
[/TD]
[TD]F
[/TD]
[TD]G
[/TD]
[TD]H
[/TD]
[TD]I
[/TD]
[/TR]
[TR]
[TD]7
[/TD]
[TD]02/01/2018
[/TD]
[TD]ITEM 1
[/TD]
[TD]105.00
[/TD]
[TD]21.00
[/TD]
[TD]126.0
[/TD]
[TD]14/09/2018
[/TD]
[TD]0 years 8 months 12 days
[/TD]
[TD]100%
[/TD]
[/TR]
</tbody>[/TABLE]
The formula I currently have in I1 is:-
=IF(DATEDIF(B6,TODAY(),"y")<=2,"100%",$T$10)
This gives me the desired result, but it does not change if the dates are changed in column B and G.
I have the following table where the deduction amounts are stored. Ideally I would like the formula to take it's information from here so that changes to deductions can be made in the future.
[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]P
[/TD]
[TD]Q
[/TD]
[TD]R
[/TD]
[TD]S
[/TD]
[TD]T
[/TD]
[/TR]
[TR]
[TD]10
[/TD]
[TD]Up to 2 Years
[/TD]
[TD][/TD]
[TD]2
[/TD]
[TD]100%
[/TD]
[TD]No Deduction
[/TD]
[/TR]
[TR]
[TD]11
[/TD]
[TD]2-3 years
[/TD]
[TD]2
[/TD]
[TD]3
[/TD]
[TD]75%
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]12
[/TD]
[TD]3-4 years
[/TD]
[TD]3
[/TD]
[TD]4
[/TD]
[TD]50%
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]13
[/TD]
[TD]Over 4 years
[/TD]
[TD][/TD]
[TD][/TD]
[TD]0%
[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I hope this all makes sense. I think I may be using the wrong formulas for this problem.
Any help or advice is very much appreciated.
Thanks,
Pad