Need some help on a formula

watkins365

New Member
Joined
Jan 21, 2025
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Sorry, i am probably being a bit dense but cannot get a formula to work.
Column J is a blank in which user inserts a date
Column L is a blank in which user might insert a date
Column O is blank BUT needs a formula that is the date inserted in J plus 5 days but only if there is no date in L, if there is a date in L then column O must be L plus 5 days .

Been going around in circles on this !
 
The formula is wrong (as in copied over incorrectly from what Joe provided), in the second IF

You have: =IF(AND(J5="",L5=""),"",IF(J5>0,L5+5,J5+5))

It needs to be: =IF(AND(J5="",L5=""),"",IF(J5>0,J5+5,L5+5))
Thank you, but I am still hitting an issue. With the formula copied and pasted it works fine with just a date in J or just a date in L. It is not changing the date in O if I then add a date in L unless I delete the date in J.

Putting it into context . On day 1 a date is always inserted in J, L is always blank on day 1. The formula generates a date in O which is J plus 5 days, correct. ON the date of J it may be discovered that a further date is needed in L. On those occasions I need it to amend the date in O to become L plus 5 days rather than J plus 5 days. I do however need the date in J to stay in J and not be deleted. Perhaps it is not possible, I am sorry to take up your time on this.
 
Upvote 0

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
You shound very confused about, what you want, as you seem to be going back-and-forth, and your stated needs seem to be just the opposite of what you stated previously.

If what you just said in your last post is actually true, the very first formula I posted in my very first reply should give you what you want:
Excel Formula:
=IF(AND(J5="",L5=""),"",IF(L5>0,L5+5,J5+5))

In a nutshell, this will do the following:
1. If there is a date in column L (regardless of what is in column J), it will add 5 days to the date in column L
2. If there is a date in column J but not column L, it will add 5 days to the date in column J
3. If there is no date in column J or column L, it will return nothing
 
Last edited:
Upvote 0
You shound very confused about, what you want, as you seem to be going back-and-forth, and your stated needs seem to be just the opposite of what you stated previously.

If what you just said in your last post is actually true, the very first formula I posted in my very first reply should give you what you want:
Excel Formula:
=IF(AND(J5="",L5=""),"",IF(L5>0,L5+5,J5+5))

In a nutshell, this will do the following:
1. If there is a date in column L (regardless of what is in column J), it will add 5 days to the date in column L
2. If there is a date in column J but not column L, it will add 5 days to the date in column J
3. If there is no date in column J or column L, it will return nothing
Thank you, my apologies again, am new to this and clearly not explaining needs coherently. Yes it does work thank you for your help.
 
Upvote 0
You are welcome.
Glad we were able to help!

Sometimes, the best way to explain these types of scenarios is with examples, i.e. show various scenarios, and your expected results for each one.
(You know the old saying, "a picture says 1000 words!");)
 
Upvote 0

Forum statistics

Threads
1,226,079
Messages
6,188,773
Members
453,499
Latest member
samdan87153

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top