+ Reply to Thread
Results 1 to 7 of 7

Formatting Concatenated results in 1 cell

  1. #1
    Registered User
    Join Date
    03-20-2009
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    56

    Formatting Concatenated results in 1 cell

    Hello,

    I have a concatenate formula which draws together a time and a statement from different spreadsheets.

    The result should look like:

    "08:45 - Name of Bill" where time is drawn from 1 cell and the actual name of the bill is drawn from another.

    How do I format the result so that the time remains formatted as time and does not convert to a decimal? I guess it is the use of "Custom" formats but can't work out how to do it.

    Any suggestions?

    Thanks & best regards,

    David

  2. #2
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Formatting Concatenated results in 1 cell

    Something like this:

    =TEXT(A1,"hh:mm")&" - "&B1

    Dom
    "May the fleas of a thousand camels infest the crotch of the person who screws up your day and may their arms be too short to scratch..."

    Use code tags when posting your VBA code: [code] Your code here [/code]

    Remember, saying thanks only takes a second or two. Click the little star to give some Rep if you think an answer deserves it.

  3. #3
    Registered User
    Join Date
    03-20-2009
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Formatting Concatenated results in 1 cell

    Thanks Dom - That works for me!

  4. #4
    Registered User
    Join Date
    03-20-2009
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Formatting Concatenated results in 1 cell

    OK so whilst that is sorted, when I was only linking in the Time value I was able to conditionally format it so it would turn green if before a certain time etc. But now it is combining Time and a Text statement the conditional format seems to have stopped.

    So can you apply a conditional format to an instance like this based on the first part of the resultant display eg 08:45?

    Best regards,

    David
    Last edited by David_S_Walker; 07-18-2011 at 08:28 AM.

  5. #5
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Formatting Concatenated results in 1 cell

    If the cell containing just the time is in the same workbook it's probably just as easy to base your conditional formatting on that using a formula.

    Dom

  6. #6
    Registered User
    Join Date
    03-20-2009
    Location
    London, England
    MS-Off Ver
    Excel 2010
    Posts
    56

    Re: Formatting Concatenated results in 1 cell

    Unfortunately it is in different workbook so I might be out of luck.

    Thanks for your repsonse.

  7. #7
    Forum Expert Domski's Avatar
    Join Date
    12-14-2009
    Location
    A galaxy far, far away
    MS-Off Ver
    Darth Office 2010
    Posts
    3,950

    Re: Formatting Concatenated results in 1 cell

    If your concatenated formula is in C1 you can return the serial time value from the start of it using =LEFT(C1,5)*1

    There's no reason why you couldn't build that into a conditional formatting formula.

    Dom

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1