Forum Discussion

Stanley Kongnetiman's avatar
Stanley Kongnetiman
Copper Contributor
Aug 25, 2017

if statement to display results of a named range

Hi there,

 

I am looking for an if-statement to display the results of a named range.  For example, If(B1="Drilling", Named Range, "").

1 Reply

  • SergeiBaklan's avatar
    SergeiBaklan
    Diamond Contributor

    Hi Stanley,

     

    Named range is only nickname for your cells range, nothing more. If you name A1:A10 as "MyRange", your formula equivalents are

    =IF(B1="Drilling", A1:A10, "")
    =IF(B1="Drilling", MyRange, "")

    which returns value in A1 if condition is TRUE. If you'd like to aggregate that coud be as

    =IF(B1="Drilling", SUM(A1:A10), "")
    =IF(B1="Drilling", SUM(MyRange), "")

    result will be the same.

     

     

     

Resources