Follow up Q to how to add a certain number of days to a date in excel

- - Latest reply: TrowaD
Posts
2510
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
August 22, 2019
- Jul 8, 2019 at 11:35 AM
Hello,

Thank you for your article with the handy tip.

What way would one make use of to fill the contents of a single row (or column, depending how one has structured one's table) to follow a certain pattern.

ie. On an annual budget with a biweekly breakdown of anticipated expenses, I think it would be nifty to be able to say write a line of code to the effect of:

While the number of columns is less than or equal to 12, add 14 days to the first date entered into the row, store that date in a variable, print the computed date onto the cell beside it.

The output ought to be a neat row of dates that span a single year.

Would this be doable using a function or would it be better to use a VB script?

Thank you for looking into this for me.

Regards,

Izanagi
See more 

1 reply

Posts
2510
Registration date
Sunday September 12, 2010
Status
Moderator
Last seen
August 22, 2019
357
0
Thank you
Hi Izanagi,

Not entirely sure I fully understand you.

Let's try a formula first.

This is how I imagined your request:
In column A you have dates. When 12 columns or less contain data, you want to add 14 days to the date in column A and place the new date in column B.

Formula in B2:
=IF(M2="",A2+14,"")

When column M contains data, more then 12 columns are used and column B remains empty.

Best regards,
Trowa
Respond to TrowaD