pedie
Well-known Member
- Joined
- Apr 28, 2010
- Messages
- 3,875
Hi, I have this formula. How can i write this in VBA to pick the range till last row taking col B as primary key. For now it is picking up till 79 row.
'=SUM(INT($J$3/$J$4*G3),IF(RANK(I3,$I$3:$I$79,0)+COUNTIF(I$3:I3,I3)-1<=($J$3-SUMPRODUCT(INT($J$3/$J$4*$G$3:$G$79))),1,0))
Thanks in Adv.
Pedie
'=SUM(INT($J$3/$J$4*G3),IF(RANK(I3,$I$3:$I$79,0)+COUNTIF(I$3:I3,I3)-1<=($J$3-SUMPRODUCT(INT($J$3/$J$4*$G$3:$G$79))),1,0))
Thanks in Adv.
Pedie