Consulting

Results 1 to 3 of 3

Thread: Concatenate a formatted number

  1. #1
    VBAX Master paulked's Avatar
    Joined
    Apr 2006
    Posts
    1,007
    Location

    Concatenate a formatted number

    Hi there.

    I have a number in cell A1 ranging from 0 to 100,000,000 and have formatted the cell to give me a shortened version of this number (eg 1,234 displays 1.2k and 1,234,567 displays 1.2M).

    However, when I try to concatenate this with text from other cells it gives me the full display of the number (eg "1,234,567 items selected" instead of "1.2M items selected").

    Any ideas?

    Thanks
    Semper in excretia sumus; solum profundum variat.

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Use

    =B1&TEXT(A1,"[>=1000000]#,##0.0,,\M;[>=1000]#,##0.0,K;##0")
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    VBAX Master paulked's Avatar
    Joined
    Apr 2006
    Posts
    1,007
    Location
    Many thanks, perfect
    Semper in excretia sumus; solum profundum variat.

Posting Permissions

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