Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Denmark
    Posts
    347
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Format a concatenated string (O2003 pro UK SP2)

    Hi,

    Hopefully a simple one...

    Got a string I would like to format a part of.

    ="substring1 "&MONTH(sheet1!A1)&" "&YEAR(sheet1!A1)&" - substring2"

    this extracts the month as a number eg. 3 (for now). I would like it formatted to March instead.

    Is this possible to do directly from within the formula?
    - or will I need to convert a date in another cell to a string and then concatenate that one into the formula?

    Bests,
    Bests,
    RD


    PS: Wish there were a knob on the TV to turn up the intelligence. There's a knob called "brightness," but that doesn't work

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Format a concatenated string (O2003 pro UK SP2)

    Try
    <code>
    ="substring1 "&TEXT(A1,"mmmm yyyy")&" - substring2"
    </code>
    I assumed that A1 contains a date. The TEXT function can be used to return a number or date as a formatted text string.

  3. #3
    3 Star Lounger
    Join Date
    Aug 2002
    Location
    Denmark
    Posts
    347
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Format a concatenated string (O2003 pro UK SP2)

    Thanks Hans,

    Exactly what I needed. So simple once you know it <blush>
    Bests,
    RD


    PS: Wish there were a knob on the TV to turn up the intelligence. There's a knob called "brightness," but that doesn't work

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •