how to get a cell to return a value based on another cell

Copper Contributor

Im very novice to formulas, but been learning. I'm searching for a functions that will add an amount per cell for a range of cells, if criteria is met in a separate range, example. If the data in C34:C39 is greater than 1, then it will return a number for the corresponding G cell and add that G34:G39 range, 

so like if i used a Sumif function, but will return the number 300 for each G cell in that range, IF the C cell has a number greater than 1. and then ( it will add the G cells to give me my final number. 

=SUMIF(C34:C39,">1",G34:G39)

  C  G
34 5   
35    
36 5   
37 5   
38 5   
39    

 

So based on this.. it would return a value of 1200 (300 for each G cell that has a corresponding C cell with a number greater than 1. 

 

I know this question was super redundant, but i just wanted to make sure I explained properly. 

 

Thanks in advance!

 

2 Replies

@nrr82787 

=300*COUNTIF(C34:C39,">1")+SUMIF(C34:C39,">1",G34:G39)

 

Alternatively:

 

=SUMPRODUCT((C34:C39>1)*(G34:G39+300))