Trying to write an IF statement that will return the following in a new cell.
If the "% replenished/visit" is greater than 20% then return "avg. qty Ord/visit" - otherwise return 0.
However if "% replenished/vist" is greater than 20% and the "std. Dev." is over 2 then add 10% to "avg. qty ord./visit" and if over 3 then add 15% - otherwise do nothing.
[TABLE="width: 796"]
<tbody>[TR]
[TD="width: 70"][/TD]
[TD="width: 242"][/TD]
[TD="width: 123"][/TD]
[TD="width: 84"][/TD]
[TD="width: 147"] [/TD]
[TD="width: 130"][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Item[/TD]
[TD]Description[/TD]
[TD]Avg. Qty Ord./visit[/TD]
[TD]Std. Dev.[/TD]
[TD]# of times ordered per Year[/TD]
[TD]% replenished/visit
[/TD]
[/TR]
[TR]
[TD]1012378[/TD]
[TD]CUSH WC PREINFLATED SEAT WAFFLE 17X17IN LF N/S REUS[/TD]
[TD]2[/TD]
[TD]0.712312546[/TD]
[TD]29[/TD]
[TD]12%[/TD]
[/TR]
[TR]
[TD]1005993[/TD]
[TD]DRSG FOAM SOFT SIL SELF ADH SACRUM MEPILEX BORDER 9.2X9.2IN[/TD]
[TD]8[/TD]
[TD]2.644963768[/TD]
[TD]16[/TD]
[TD]6%[/TD]
[/TR]
[TR]
[TD]1004953[/TD]
[TD]BATT ALK PROCELL SZ AA 1.5V[/TD]
[TD]22[/TD]
[TD]0.630603535[/TD]
[TD]19[/TD]
[TD]8%[/TD]
[/TR]
[TR]
[TD]1004715 [/TD]
[TD]ST PITCHER H2O INSUL FOAM OUTER JCKT LF[/TD]
[TD]7[/TD]
[TD]3.370355089[/TD]
[TD]237[/TD]
[TD]95%[/TD]
[/TR]
[TR]
[TD]1004577[/TD]
[TD]STRIP TEST BLD GLUCLOSE MNTR ACCU-CHEK INFORM II[/TD]
[TD]7[/TD]
[TD]1.247219129[/TD]
[TD]45[/TD]
[TD]18%[/TD]
[/TR]
</tbody>[/TABLE]
If the "% replenished/visit" is greater than 20% then return "avg. qty Ord/visit" - otherwise return 0.
However if "% replenished/vist" is greater than 20% and the "std. Dev." is over 2 then add 10% to "avg. qty ord./visit" and if over 3 then add 15% - otherwise do nothing.
[TABLE="width: 796"]
<tbody>[TR]
[TD="width: 70"][/TD]
[TD="width: 242"][/TD]
[TD="width: 123"][/TD]
[TD="width: 84"][/TD]
[TD="width: 147"] [/TD]
[TD="width: 130"][/TD]
[/TR]
</tbody>[/TABLE]
[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]Item[/TD]
[TD]Description[/TD]
[TD]Avg. Qty Ord./visit[/TD]
[TD]Std. Dev.[/TD]
[TD]# of times ordered per Year[/TD]
[TD]% replenished/visit
[/TD]
[/TR]
[TR]
[TD]1012378[/TD]
[TD]CUSH WC PREINFLATED SEAT WAFFLE 17X17IN LF N/S REUS[/TD]
[TD]2[/TD]
[TD]0.712312546[/TD]
[TD]29[/TD]
[TD]12%[/TD]
[/TR]
[TR]
[TD]1005993[/TD]
[TD]DRSG FOAM SOFT SIL SELF ADH SACRUM MEPILEX BORDER 9.2X9.2IN[/TD]
[TD]8[/TD]
[TD]2.644963768[/TD]
[TD]16[/TD]
[TD]6%[/TD]
[/TR]
[TR]
[TD]1004953[/TD]
[TD]BATT ALK PROCELL SZ AA 1.5V[/TD]
[TD]22[/TD]
[TD]0.630603535[/TD]
[TD]19[/TD]
[TD]8%[/TD]
[/TR]
[TR]
[TD]1004715 [/TD]
[TD]ST PITCHER H2O INSUL FOAM OUTER JCKT LF[/TD]
[TD]7[/TD]
[TD]3.370355089[/TD]
[TD]237[/TD]
[TD]95%[/TD]
[/TR]
[TR]
[TD]1004577[/TD]
[TD]STRIP TEST BLD GLUCLOSE MNTR ACCU-CHEK INFORM II[/TD]
[TD]7[/TD]
[TD]1.247219129[/TD]
[TD]45[/TD]
[TD]18%[/TD]
[/TR]
</tbody>[/TABLE]