# 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.

7 Replies

# Re: Excel Formula help

A basic solution might be

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

# Re: Excel Formula help

@Peter Bartholomew 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

# Re: Excel Formula help

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, "")``

# Re: Excel Formula help

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  @Hans Vogelaar

# Re: Excel Formula help

How would I work this for multiple options. EG if Yes its +14 but if its no its +7

# Re: Excel Formula help

For example

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

or

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

# Re: Excel Formula help

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. 