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

Closed
Izanagi7 - 4 Jul 2019 à 21:44
TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 - 8 Jul 2019 à 11:35
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
Related:

1 response

TrowaD Posts 2921 Registration date Sunday 12 September 2010 Status Contributor Last seen 27 December 2022 555
8 Jul 2019 à 11:35
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