Logical IF return a cell reference

  • Thread starter Thread starter Larry G
  • Start date Start date
L

Larry G

I want to use a logical IF formula to return a cell range SUM, or at least a
cell reference. Can't seem to figure it out.
 
It is always better to post the formula you tried explaining how the data is
arranged.

'The below formula returns the value from cell B1 if A1 = 1 or otherwise
returns blank
=IF(A1=1,B1,"")

The below formula will return the sum of cells B1:B10 if there is a text
"Yes" in cell A1; or otherwise returns blank
=IF(A1="YES",SUM(B1:B10),"")
 
Say we want to sum B1 thru B100 if A1 is a one, otherwise sum C1 thru C100:

=SUM(IF(A1=1,B1:B100,C1:C100))
 
Back
Top