+ Reply to Thread
Results 1 to 6 of 6

Problems appending cells together

  1. #1
    Registered User
    Join Date
    08-19-2006
    Posts
    2

    Problems appending cells together

    I have what I hope will be a nice easy question for you guys...

    I'm putting together a worksheet for our local sports league. I want to append the scores from two cells together with a - in between them (e.g. 2-1), which works fine unless the 2nd score is a zero, in which case it ignores the - (e.g. 20). How can I get it to display the - all the time?

    I can't change the formatting of the cells, because if the score is blank (i.e. the match is in the future), then the new cell displays the date of the match.

    I hope that makes sense... ,
    Chris L

  2. #2
    Don Guillett
    Guest

    Re: Problems appending cells together

    As ALWAYS, post your efforts for comments


    --
    Don Guillett
    SalesAid Software
    [email protected]
    "ChrisL" <[email protected]> wrote in
    message news:[email protected]...
    >
    > I have what I hope will be a nice easy question for you guys...
    >
    > I'm putting together a worksheet for our local sports league. I want to
    > append the scores from two cells together with a - in between them (e.g.
    > 2-1), which works fine unless the 2nd score is a zero, in which case it
    > ignores the - (e.g. 20). How can I get it to display the - all the
    > time?
    >
    > I can't change the formatting of the cells, because if the score is
    > blank (i.e. the match is in the future), then the new cell displays the
    > date of the match.
    >
    > I hope that makes sense... ,
    > Chris L
    >
    >
    > --
    > ChrisL
    > ------------------------------------------------------------------------
    > ChrisL's Profile:
    > http://www.excelforum.com/member.php...o&userid=37767
    > View this thread: http://www.excelforum.com/showthread...hreadid=573439
    >




  3. #3
    Gord Dibben
    Guest

    Re: Problems appending cells together

    Chris

    How are you appending?

    A1 = 2
    B1 = 0

    =A1 & "-" & B1 returns 2-0


    Gord Dibben MS Excel MVP

    On Sat, 19 Aug 2006 14:36:25 -0400, ChrisL
    <[email protected]> wrote:

    >
    >I have what I hope will be a nice easy question for you guys...
    >
    >I'm putting together a worksheet for our local sports league. I want to
    >append the scores from two cells together with a - in between them (e.g.
    >2-1), which works fine unless the 2nd score is a zero, in which case it
    >ignores the - (e.g. 20). How can I get it to display the - all the
    >time?
    >
    >I can't change the formatting of the cells, because if the score is
    >blank (i.e. the match is in the future), then the new cell displays the
    >date of the match.
    >
    >I hope that makes sense... ,
    >Chris L



  4. #4
    Toppers
    Guest

    RE: Problems appending cells together

    Will this do ...?

    =IF(AND(A1<>"",B1<>""),A1 & " - " & B1,"")

    Somewhat confused by "if the score is blank (i.e. the match is in the
    future), then the new cell displays the date of the match".


    HTH

    "ChrisL" wrote:

    >
    > I have what I hope will be a nice easy question for you guys...
    >
    > I'm putting together a worksheet for our local sports league. I want to
    > append the scores from two cells together with a - in between them (e.g.
    > 2-1), which works fine unless the 2nd score is a zero, in which case it
    > ignores the - (e.g. 20). How can I get it to display the - all the
    > time?
    >
    > I can't change the formatting of the cells, because if the score is
    > blank (i.e. the match is in the future), then the new cell displays the
    > date of the match.
    >
    > I hope that makes sense... ,
    > Chris L
    >
    >
    > --
    > ChrisL
    > ------------------------------------------------------------------------
    > ChrisL's Profile: http://www.excelforum.com/member.php...o&userid=37767
    > View this thread: http://www.excelforum.com/showthread...hreadid=573439
    >
    >


  5. #5
    Registered User
    Join Date
    08-19-2006
    Posts
    2
    Quote Originally Posted by Gord Dibben
    =A1 & "-" & B1 returns 2-0
    Bizarrly that IS what I was using, but without the spaces. Having put the spaces in, it works perfectly.

    I knew it'd be simple!

    Very many thanks Gord,

    Chris.

  6. #6
    Gord Dibben
    Guest

    Re: Problems appending cells together

    Chris

    The only spaces my formula contains are for ease of reading only, not to make it
    work.

    But happy to hear you're happy.

    See Toppers' error-checking formula also.


    Gord Dibben MS Excel MVP


    On Sat, 19 Aug 2006 17:56:35 -0400, ChrisL
    <[email protected]> wrote:

    >
    >Gord Dibben Wrote:
    >>
    >> =A1 & "-" & B1 returns 2-0
    >>

    >
    >Bizarrly that IS what I was using, but without the spaces. Having put
    >the spaces in, it works perfectly.
    >
    >I knew it'd be simple!
    >
    >Very many thanks Gord,
    >
    >Chris.



+ 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