Procedure
It would be great to obtain some help to find the formula to obtain a code to implement the following procedure in numbers, iWork. Basically, I want to compare a cell (lets call the cell "a1") with a range of cells (abbreviated with "ci" where i stands for a range of numbers, e.g.1 to 10 so that we obtain the cell c1, c2 etc). If a1=ci, then I would like numbers to add add the respective values of bi (where b is a different column but the same row "i") and return the value of the sum. I hope my description makes sense.
abc:=proc(a1,c,b) #where c=column and a1=cell, b=column
q:=0
for i from 1 to 10 do #range 1 to 10 for simplification, best would be to add variables to that too
if ci=a1 then
q:=(q+bi);
end if;
end do;
return(q);
end proc;
Any help would be very much appreciated!
Numbers-OTHER