Stephen_IV
Well-known Member
- Joined
- Mar 17, 2003
- Messages
- 1,180
- Office Version
- 365
- 2019
- Platform
- Windows
I have dates that are formatted a:
1012019
1022019
4012018
What I need to do is to take those dates and minus 1 from them:
1012019 = 12312018
1022019 = 1012019
4012018 = 3312018
I have a formula that I figured out below (It works but do not know if it the best solution)
What I am trying to do is to emulate this in VBA but I am stuck. I know in some of my other posts people say it is overkill to do it in VBA
but because I cannot do it in VBA, I need to learn and grow. Any help would be appreciated!
1012019
1022019
4012018
What I need to do is to take those dates and minus 1 from them:
1012019 = 12312018
1022019 = 1012019
4012018 = 3312018
I have a formula that I figured out below (It works but do not know if it the best solution)
Code:
=--TEXT(TEXT(A1,"00\/00\/0000")-1,"mmddyyyy")
What I am trying to do is to emulate this in VBA but I am stuck. I know in some of my other posts people say it is overkill to do it in VBA
but because I cannot do it in VBA, I need to learn and grow. Any help would be appreciated!