I have Dates and Times in Cols B & D from row 2 onwards
I have tried to write code to move the Times from Col B to C and from Col D to E but cannot get this to work
Kindly test & amend my code
Please Login or Register to view this content.
I have Dates and Times in Cols B & D from row 2 onwards
I have tried to write code to move the Times from Col B to C and from Col D to E but cannot get this to work
Kindly test & amend my code
Please Login or Register to view this content.
Hi I would suggest the following
DON'T USE .VAluePlease Login or Register to view this content.
---
Hans
"IT" Always crosses your path!
May the (vba) code be with you... if it isn't; start debugging!
If you like my answer, Click the * below to say thank-you
The code works. You just need to format the cells as Time instead of Date.
At least, Im assuming the code works as the cells have Time values in them but are formatted as Date.
Last edited by TMS; 04-30-2023 at 03:33 AM.
Trevor Shuttleworth - Retired Excel/VBA Consultant
I dream of a better world where chickens can cross the road without having their motives questioned
'Being unapologetic means never having to say you're sorry' John Cooper Clarke
Can be done easily with a formula:
=MOD(B2,1)
=MOD(D2,1)
Format columns C and E as TIME.
Ali
Enthusiastic self-taught user of MS Excel who's always learning!
Don't forget to say "thank you" in your thread to anyone who has offered you help.
You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.
Forum Rules (updated August 2023): please read them here.
VBA, no loop
Please Login or Register to view this content.
Many Thanks for the help, much appreciated
You're welcome. Thanks for the rep.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks