if index match if question if possible

Copper Contributor

if cell a1 = cell a2, index c1:c10, match b1, d1:d10, and if cell a1 = cell a1, devide the result of the index and match by e1

 

=IF(A1=A2,INDEX(C1:C10,MATCH(B1,D1:D10,0) ----- i am trying to get the result of this to then IF(A1=A2/D1,0)

 

is there a way to do this?

 

would really appreciate anyones help

1 Reply
=IF(A1=A2,INDEX(C1:C10,MATCH(B1,D1:D10,0))) / IF(A1=A2, E1, 1)
so just divide the 2 IF() statements but if it is false do you want to divide by 1 and not 0 because dividing by 0 with get an error while dividing by 1 will not affect the result