Date & time formatted on 2 lines in 1 cell

crug

Board Regular
Joined
Jan 14, 2006
Messages
56
Hello
Apologies if this has been solved previously - i have a number of dates on Sheet1, ie (=NOW() +1/48) and use those in Sheet2 as a dropdown list. The cell it goes into on Sheet2 is not wide enough for (06/09/2022 13:00:00) on 1 line. I need it to be Date & Chr(10) & Time as below.
06/09/2022
13:00:00

I cant seem to format using Format Cell correctly and wondered if i could with vba?
 
It is interesting as you point out it does not react well in pivots etc... (Every day is a school day)

It is almost as if there is no point Excel converting it if it can only use it in specific scenarios. It also explains why XL2BB is stating that it is text.

I would discount that solution then as it is far from perfect.

The solution I would choose then is post 6 as it looks good and can be analysed.
 
Upvote 0

Excel Facts

What does custom number format of ;;; mean?
Three semi-colons will hide the value in the cell. Although most people use white font instead.
In doing some research into this, you can achieve the column B lookup without VBA if you highlight column A, then go to
Format Cells > Custom > put in
Rich (BB code):
dd/mm/yyyy Ctrl+J hh:mm
Then format with wrap text
and increase the column height.
 
Upvote 0

Forum statistics

Threads
1,215,438
Messages
6,124,873
Members
449,192
Latest member
MoonDancer

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