Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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


--
ChrisL
------------------------------------------------------------------------
ChrisL's Profile: http://www.excelforum.com/member.php...o&userid=37767
View this thread: http://www.excelforum.com/showthread...hreadid=573439

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default 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
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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Problems appending cells together


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.


--
ChrisL
------------------------------------------------------------------------
ChrisL's Profile: http://www.excelforum.com/member.php...o&userid=37767
View this thread: http://www.excelforum.com/showthread...hreadid=573439



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default 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
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
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Linking Groups of cells between workbooks vnacj-joe Excel Discussion (Misc queries) 4 June 14th 07 05:18 PM
Sumif Cells Are Not Blank Powlaz Excel Worksheet Functions 12 March 15th 06 04:40 PM
Copy/Paste how to avoid the copy of formula cells w/o calc values Dennis Excel Discussion (Misc queries) 10 March 2nd 06 10:47 PM
Convert data type of cells to Text,Number,Date and Time Kevin Excel Worksheet Functions 1 December 31st 04 12:57 PM
copy group of cells to another group of cells using "IF" in third Chuckak Excel Worksheet Functions 2 November 10th 04 06:04 PM


All times are GMT +1. The time now is 05:17 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"