ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Adding Text to Answer (https://www.excelbanter.com/excel-worksheet-functions/162831-adding-text-answer.html)

[email protected]

Adding Text to Answer
 
First of all let me start by saying im not even sure if this is
possible but...

Is there a way that if i have two teams and team a has a total of 30
runs and team b has a total of 14 runs...i want to compare the two
i.e. 30-14 but instead of the answer just coming out 16, i want it to
come out as Team A by 16.....so that way if it was the other way
around instead of just giving me a -16 it would say Team B by 16

Team A total is in cell F5 and Team B total is in cell G5...so a
normal formula would be a simple (f5-g5)


Pete_UK

Adding Text to Answer
 
Try this:

=IF(F5G5,"Team A by "&F5-G5,IF(G5F5,"Team B by "&G5-F5,"Draw"))

Hope this helps.

Pete

On Oct 19, 6:46 pm, wrote:
First of all let me start by saying im not even sure if this is
possible but...

Is there a way that if i have two teams and team a has a total of 30
runs and team b has a total of 14 runs...i want to compare the two
i.e. 30-14 but instead of the answer just coming out 16, i want it to
come out as Team A by 16.....so that way if it was the other way
around instead of just giving me a -16 it would say Team B by 16

Team A total is in cell F5 and Team B total is in cell G5...so a
normal formula would be a simple (f5-g5)




[email protected]

Adding Text to Answer
 
On Oct 19, 1:56 pm, Pete_UK wrote:
Try this:

=IF(F5G5,"Team A by "&F5-G5,IF(G5F5,"Team B by "&G5-F5,"Draw"))

Hope this helps.

Pete

On Oct 19, 6:46 pm, wrote:



First of all let me start by saying im not even sure if this is
possible but...


Is there a way that if i have two teams and team a has a total of 30
runs and team b has a total of 14 runs...i want to compare the two
i.e. 30-14 but instead of the answer just coming out 16, i want it to
come out as Team A by 16.....so that way if it was the other way
around instead of just giving me a -16 it would say Team B by 16


Team A total is in cell F5 and Team B total is in cell G5...so a
normal formula would be a simple (f5-g5)- Hide quoted text -


- Show quoted text -

this works perfectly for if Team A is ahead but for anytime that team
B is ahead it gives me the response of Draw


Pete_UK

Adding Text to Answer
 
It shouldn't do - just check that you have typed it in correctly.

Pete

On Oct 19, 6:59 pm, wrote:

this works perfectly for if Team A is ahead but for anytime that team
B is ahead it gives me the response of Draw



[email protected]

Adding Text to Answer
 
On Oct 19, 2:04 pm, Pete_UK wrote:
It shouldn't do - just check that you have typed it in correctly.

Pete

On Oct 19, 6:59 pm, wrote:





this works perfectly for if Team A is ahead but for anytime that team
B is ahead it gives me the response of Draw- Hide quoted text -


- Show quoted text -


Yea two of the cells were just backwards, I corrected it and it works
like a charm...thanks alot for your help


[email protected]

Adding Text to Answer
 
On Oct 19, 1:59 pm, wrote:
On Oct 19, 1:56 pm, Pete_UK wrote:



Try this:


=IF(F5G5,"Team A by "&F5-G5,IF(G5F5,"Team B by "&G5-F5,"Draw"))


Hope this helps.


Pete


On Oct 19, 6:46 pm, wrote:


First of all let me start by saying im not even sure if this is
possible but...


Is there a way that if i have two teams and team a has a total of 30
runs and team b has a total of 14 runs...i want to compare the two
i.e. 30-14 but instead of the answer just coming out 16, i want it to
come out as Team A by 16.....so that way if it was the other way
around instead of just giving me a -16 it would say Team B by 16


Team A total is in cell F5 and Team B total is in cell G5...so a
normal formula would be a simple (f5-g5)- Hide quoted text -


- Show quoted text -


this works perfectly for if Team A is ahead but for anytime that team
B is ahead it gives me the response of Draw- Hide quoted text -

- Show quoted text -


Two of the cells just needed to be switched around, but now it works
like a charm....thanks for your help


Pete_UK

Adding Text to Answer
 
You're welcome - thanks for feeding back.

Pete

On Oct 19, 7:25 pm, wrote:

Two of the cells just needed to be switched around, but now it works
like a charm....thanks for your help



Ron Rosenfeld

Adding Text to Answer
 
On Fri, 19 Oct 2007 17:46:15 -0000, wrote:

First of all let me start by saying im not even sure if this is
possible but...

Is there a way that if i have two teams and team a has a total of 30
runs and team b has a total of 14 runs...i want to compare the two
i.e. 30-14 but instead of the answer just coming out 16, i want it to
come out as Team A by 16.....so that way if it was the other way
around instead of just giving me a -16 it would say Team B by 16

Team A total is in cell F5 and Team B total is in cell G5...so a
normal formula would be a simple (f5-g5)



If you want to maintain the result as a number, you could use custom
formatting:

Format/Cells/Number/Custom Type:

"Team A by "0;"Team B By "0;"Draw"

If the result is greater than 0, then Team A is ahead; if less than 0, then
Team B is ahead; and if equal 0, the cell will show "Draw"
--ron


All times are GMT +1. The time now is 06:04 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com