Formatting in Bulk

Graham C1600

Board Regular
Joined
Feb 17, 2018
Messages
96
Office Version
  1. 365
Hi,

Is there a simple way to change the following in bulk ?
11/04/2022 01:00:00

I need it to look like this
11/04/2022
01:00:00

I know I can Alt+Ent in singular cells but I have to do around 200 cells at a time.
If I check the formatting of the cells it is Custom dd/mm/yyyy hh:mm

I'm copying data from another source and pasting into excel and was wondering if there was an easier way of doing this.

Thanks
 

Excel Facts

Excel Joke
Why can't spreadsheets drive cars? They crash too often!
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Try this.
Select the data/column etc and in the Custom formatting dialog, remove that space character between y and h and type Ctrl+J there instead. Set the cell formatting to Wrap Text
 
Upvote 0
I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)

Try this.
Select the data/column etc and in the Custom formatting dialog, remove that space character between y and h and type Ctrl+J there instead. Set the cell formatting to Wrap Text
Worked a treat. Thank you very much.
 
Upvote 0
Data Range "G2:G6"
Sub Macro()
Dim K As Double
For Each Cel In Range("G2:G6")
K = Cel
Cel.Value = Format(Int(K), "dd:mm:YY") & Chr(10) & Format(K - Int(K), "hh:mm:ss")
Next Cel
End sub
 
Upvote 0
Worked a treat. Thank you very much.
You're welcome. Thanks for the follow-up. :)

.. and thanks for updating your details. (y)

@kvsrinivasamurthy
  • When posting vba code in the forum, please use the available code tags. My signature block below has more details.

  • Your suggestion would turn the cell values from actual date/time values (numerical) to text values which would deny any future date/time calculations from those values.
 
Upvote 0
You're welcome. Thanks for the follow-up. :)

.. and thanks for updating your details. (y)

@kvsrinivasamurthy
  • When posting vba code in the forum, please use the available code tags. My signature block below has more details.

  • Your suggestion would turn the cell values from actual date/time values (numerical) to text values which would deny any future date/time calculations from those values.
Sorry for forgetting to put codes in tags. I will take care in future. Happy if problem is solved.
 
Upvote 0

Forum statistics

Threads
1,215,584
Messages
6,125,670
Members
449,248
Latest member
wayneho98

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top