Forum Discussion
Jamesb1982
May 18, 2023Copper Contributor
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.
PeterBartholomew1
May 18, 2023Silver Contributor
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
May 18, 2023Copper Contributor
How would I work this for multiple options. EG if Yes its +14 but if its no its +7
- PeterBartholomew1May 18, 2023Silver Contributor
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.
- HansVogelaarMay 18, 2023MVP
For example
=ColumnA + IF((ColumnB = "Yes") + (ColumnC = "Yes") + (ColumnD = "Yes"), 14, 7)or
=A2 + IF(OR(B2:D2="Yes"), 14, 7)