View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
Terry Pinnell[_4_] Terry Pinnell[_4_] is offline
external usenet poster
 
Posts: 192
Default Cell not displaying as expected

Terry Pinnell wrote:

Terry Pinnell wrote:

Claus Busch wrote:

Hi Terry,

Am Sat, 20 Jan 2018 11:25:46 +0000 schrieb Terry Pinnell:

Why does the date in B6 not display fully, by overlapping into the next
col, like B1, B2, B3, etc? C6 etc have General format. No wrap enabled
on B6, C6, etc.

https://www.dropbox.com/s/58itk1jlq3...ay-01.jpg?dl=0

only text will overlap if it is longer. If numbers are longer than the
cell width you see only the number signs.


Regards
Claus B.


Thanks for the fast solution, Claus. That was nagging me for ages this
morning!

Terry, East Grinstead, UK


But before I give up (I don't want to manually widen the column) is
there some way I can achieve it with a formula or VBA please?

IOW, if I type say 09/08/17 into B6, with cells empty to the right as
shown, is it possible to automatically display that in full? Especially
if I decide to apply a lengthier format such as 'dddd dd mmm yyyy',
giving 'Saturday 20 January 2018'.

Terry, East Grinstead, UK


I think I may have developed a solution with this function.

=TEXT("20/1/18", "dddd dd mmmm yyy")

That displays 'Saturday 20 January 2018', using empty cells to the right
as required.

(Even better would be 'Saturday 20th January 2018' and I'll look into
that later, using the help Claus gave me last year on adding
'ordinals'.)

The snag is that in practice I'm not *manually* entering '20/1/18' but
doing it from my Macro Express Pro macro. But I should be able to
assemble it with MX Po in its three parts:
=TEXT("
20/1/18
", "dddd dd mmmm yyy")

and then paste that in its entirety into the worksheet.

--------------------

BTW, is that a Function or a Formula? I'm hazy about the difference.