View Single Post
  #4   Report Post  
Robinhoodz Robinhoodz is offline
Junior Member
 
Posts: 1
Question

So this formula works great for what I am trying to do. however I am trying to add an unknown amount of Rows sometime 10 sometimes 1,000. if I set the Look-up Array to the whole column the formula no longer works. the Columns I am looking up and trying to add are vlookup equations which will sometimes have #N/A and sometimes have values.

would I need to set the


for example

A (tariff)
7321.12.0000
8421.99.0040
7321.12.0000
8211.92.9045


B (boxes)
0.88
1
0.88
#N/A

C (weight)
9.9
12
9.9
#N/A

D (goal)
list of Tariff codes with number of boxes per code and total weight per code in adjacent columns E and F

E4 should equal 1.76
F4 should equal 19.8 (when equation is moved over)

=SUM(IF(FREQUENCY(IF(A$4:A$8=D4,MATCH("~"&B$4:B$8, B$4:B$8&"",0)),ROW(B$4:B$8)-ROW(B$4)+1),B$4:B$8))