Ironman
Well-known Member
- Joined
- Jan 31, 2004
- Messages
- 1,069
- Office Version
- 365
- Platform
- Windows
Hi
A2 contains today's date
A6 contains the formula
which is the number of days remaining in the current year.
Column A12 down contains dates from Jan 1 1998 onwards.
What I'm after is an amended formula for A6 so if the last cell in Col A does not also contain today's date then the formula in A6 adds 1 to the result (and if the last cell does contain today's date then the A6 formula result remains as it is).
If it can only be done with VBA then I'd also be grateful for a bit of worksheet_change event code that will enable this.
Many thanks!
A2 contains today's date
Excel Formula:
=UPPER(TEXT(TODAY(),"d mmm yyyy"))
A6 contains the formula
Excel Formula:
=DATE(YEAR(A2),12,31)-A2
Column A12 down contains dates from Jan 1 1998 onwards.
What I'm after is an amended formula for A6 so if the last cell in Col A does not also contain today's date then the formula in A6 adds 1 to the result (and if the last cell does contain today's date then the A6 formula result remains as it is).
If it can only be done with VBA then I'd also be grateful for a bit of worksheet_change event code that will enable this.
Many thanks!
Last edited: