View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 380
Default Custom Format for User Defined Function

without the =

--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

"Bob Phillips" wrote in message
...
Try

=Range("A1").Text & " - " & Range("A2").Text



--

HTH

Bob Phillips

(replace xxxx in the email address with gmail if mailing direct)

wrote in message
oups.com...
Hi,

I am making my first attempt at a custom function and am having some
trouble. I have two columns with dates with the format 8-Feb and
12-Jun as an example. The 8 and 12 are actually the year, but Excel is
recognizing it as the day. That's fine, because I just need it as a
display thing. What I want to do is create a format that will show me
"8-Feb - 12-Jun". When I do it A1&" - "&A2, I get the serial number of
the dates (the wrong dates because again, Excel reads the numbers as
the day and appends 2006 as the year).

So, I am trying to create a user function called Window. How would I
go about creating this user function so that it comes out in the right
format?

Or, can I simply make a custom format in the Format Cells screen that
will do the trick?

Thanks!

Brett