ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Logical IF return a cell reference (https://www.excelbanter.com/excel-discussion-misc-queries/251495-logical-if-return-cell-reference.html)

Larry G

Logical IF return a cell reference
 
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.

Jacob Skaria

Logical IF return a cell reference
 
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),"")

--
Jacob


"Larry G" wrote:

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.


Gary''s Student

Logical IF return a cell reference
 
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))

--
Gary''s Student - gsnu200909


"Larry G" wrote:

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.



All times are GMT +1. The time now is 07:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com