amoverton2
Board Regular
- Joined
- May 13, 2021
- Messages
- 77
- Office Version
- 2016
- Platform
- Windows
Hi!
I think I'm in the right place with this post, if I need a new one please let me know... My problem is that I'm not as smart with Excel as most of you are.
Here's my problem, in the below, all of the dates have something before and after the date, if I manually go into the cell and delete what's before and after the cell, after hitting enter, it allows for new formatting of the date into what I want. I have a bunch of sheets with dates just like this and it would be painful to do it manually. I'm looking for a VBA code or formula that would clear out the hidden items within the cell that I don't know how to eliminate besides what I described above. Ideally, a code that runs after workbook activation that checks all the sheets (say for now 30 sheets with the A3:E11 cell range) removes the characters, and formats the cell to have a date formation of DD-MMM-YYYY. Clean and trim do not do the trick, and a couple of the VBA codes (CleanTrim, SmartTrim) I found while trying to figure this out haven't worked, Please Help!
Thanks,
Adam
I think I'm in the right place with this post, if I need a new one please let me know... My problem is that I'm not as smart with Excel as most of you are.
Here's my problem, in the below, all of the dates have something before and after the date, if I manually go into the cell and delete what's before and after the cell, after hitting enter, it allows for new formatting of the date into what I want. I have a bunch of sheets with dates just like this and it would be painful to do it manually. I'm looking for a VBA code or formula that would clear out the hidden items within the cell that I don't know how to eliminate besides what I described above. Ideally, a code that runs after workbook activation that checks all the sheets (say for now 30 sheets with the A3:E11 cell range) removes the characters, and formats the cell to have a date formation of DD-MMM-YYYY. Clean and trim do not do the trick, and a couple of the VBA codes (CleanTrim, SmartTrim) I found while trying to figure this out haven't worked, Please Help!
DATES.xlsx | |||||||
---|---|---|---|---|---|---|---|
A | B | C | D | E | |||
1 | DATE1 | DATE2 | DATE3 | DATE4 | DATE5 | ||
2 | 10/01/2021 | 10/2024 | 11/22/2026 | 11/22/2026 | |||
3 | 03/01/2023 | 03/2026 | 06/16/2027 | 06/16/2027 | |||
4 | 05/01/2020 | 11/2023 | 04/26/2027 | 04/26/2027 | 04/22/2024 | ||
5 | 11/01/2020 | 01/2024 | 06/19/2029 | 06/19/2029 | 03/03/2024 | ||
6 | 04/01/2021 | 04/2025 | 02/10/2024 | 02/10/2026 | |||
7 | 10/01/2020 | 11/2023 | 07/11/2029 | 07/11/2029 | 12/30/2023 | ||
8 | 04/01/2022 | 09/2025 | 06/09/2025 | 06/09/2025 | |||
9 | 07/06/2026 | 07/06/2028 | 08/28/2023 | ||||
10 | 04/01/2023 | 03/2026 | 07/04/2026 | 07/04/2026 | |||
RJN_CTT |
Thanks,
Adam