Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I am writing a macro to save the name in cell A1 and I have a date Value in
cell B5 I am wanting excel to suggest for example greg 15 june 2005 here is the code so far but it wont save because it is coming up 16/6/2005 Suggestion = Range("A1").Value & Range("B5") Thank in advance Greg |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Suggestion = Range("A1").Value _
& lcase(format(Range("B5").value,"dd mmmm yyyy")) Greg Brow wrote: I am writing a macro to save the name in cell A1 and I have a date Value in cell B5 I am wanting excel to suggest for example greg 15 june 2005 here is the code so far but it wont save because it is coming up 16/6/2005 Suggestion = Range("A1").Value & Range("B5") Thank in advance Greg -- Dave Peterson |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks worked a charm
Greg |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Just some added info:
If the cells look as you want, you could simplify that to Range("Whatever").Value = Range("A1").Text & " " & Range("B5").Text or Range("Whatever").Value = Trim(Range("A1").Text) & " " & _ Trim(Range("B5").Text) Text displays as the cell displays Value displays what is actually stored in the cell. If you want Dave's solution to return what you stated, you might want to add Suggestion = trim(Range("A1").Value) & " " & _ & lcase(format(Range("B5").value,"dd mmmm yyyy")) -- Regards, Tom Ogilvy "Greg Brow" wrote in message ... thanks worked a charm Greg |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks will try them all to see what works the best
Greg "Tom Ogilvy" wrote in message ... Just some added info: If the cells look as you want, you could simplify that to Range("Whatever").Value = Range("A1").Text & " " & Range("B5").Text or Range("Whatever").Value = Trim(Range("A1").Text) & " " & _ Trim(Range("B5").Text) Text displays as the cell displays Value displays what is actually stored in the cell. If you want Dave's solution to return what you stated, you might want to add Suggestion = trim(Range("A1").Value) & " " & _ & lcase(format(Range("B5").value,"dd mmmm yyyy")) -- Regards, Tom Ogilvy "Greg Brow" wrote in message ... thanks worked a charm Greg |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
permanent conversion of 1904 date format to 1900 date format | Excel Worksheet Functions | |||
change date format dd/mm/yyyy to Julian date format? | Excel Worksheet Functions | |||
Excel 2000 date format cannot be set to Australian date format | Excel Discussion (Misc queries) | |||
code to convert date from TEXT format (03-02) to DATE format (200203) | Excel Programming | |||
Change a date in text format xx.xx.20xx to a recognised date format | Excel Programming |