Forum Discussion

Jamesb1982's avatar
Jamesb1982
Copper Contributor
May 18, 2023

Excel Formula help

Hey Guys 

 

Hope all are well. I need to formula and I'm having trouble. 

 

So if A is a date. If B,C,D say yes I want to add 2 weeks on from A into E. If that makes. 

 

thanks in advance. 

7 Replies

  • Jamesb1982 

    Because I use Excel 365, what I would actually do is name column A to be 'date' and the 3 columns of "Yes/No"s to be something like 'status'.  

     

     

    = IF(BYROW(status = "Yes", ORλ), date+14, "")
    
    where
    ORλ
    = LAMBDA(x, OR(x))

     

     

    That might look somewhat less familiar though!  

    Note: the names I use are applied to occupied data cells, not entire columns.

     

    Thanks go to  HansVogelaar 

    • Jamesb1982's avatar
      Jamesb1982
      Copper Contributor
      How would I work this for multiple options. EG if Yes its +14 but if its no its +7
      • PeterBartholomew1's avatar
        PeterBartholomew1
        Silver Contributor

        Jamesb1982 

        Clearly as your requirements get more complex the solutions will need to be reworked to capture the intent of the formula.  At the moment, a simple modification will suffice.  I have converted the input to a Table so that it grows with new data.  The result is a separate dynamic array which will grow along with the Table.

         

    • Jamesb1982's avatar
      Jamesb1982
      Copper Contributor

      PeterBartholomew1 Hi Pete. 

       

      Looking at this little closer. I only need 1 Column to say yes. so what would that formula be? I've attempted to amend but I'm getting a spill error

      • HansVogelaar's avatar
        HansVogelaar
        MVP

        Jamesb1982 

        Change the formula to

         

        = IF((ColumnB = "Yes") + (ColumnC = "Yes") + (ColumnD = "Yes"), ColumnA + 14, "")

         

        Replace ColumnA, ColumnB etc. with the ranges that you use.

        Alternatively, enter the following formula in for example E2, then fill down:

         

        = IF(OR(B2:D2 = "Yes"), A2 + 14, "")

         

Resources