Adding Text to Answer

D

derr04

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)
 
P

Pete_UK

Try this:

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

Hope this helps.

Pete
 
D

derr04

Try this:

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

Hope this helps.

Pete





- 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
 
D

derr04

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

Pete



- 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
 
D

derr04

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
 
R

Ron Rosenfeld

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top