convert letter to number in a column

Hi,

Just curious, how did the "W" and "L" get in Column F in the first place, if it's manually entered, why not enter 5 and -5 instead, if it's by formula, then change your formula's output accordingly (instead of W, 5, instead of L, -5), or are you wanting to ADD 5 for W, SUBSTRACT 5 for L, in column G?

Haven't played Hearts in many years, forgot how the scoring works, but may be this?


Excel 2010
ABCDEFG
1MIKENORTHEASTWESTSHOOT MOONW/LWON/LOST
2282778102-5
344571121045
478523784-5
5461107383105
6606610977155
7716310422-5
Sheet25
Cell Formulas
RangeFormula
F2=IF(MIN(A2:D2)=A2,5,-5)


Assuming you're Mike, didn't you actually Lose the first game? (You had W in column F for the first game)
 
Last edited:
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
you're making this too difficult. I want to put a W in column F to equal $5.00 or an L to equal -$5.00
Where is the $5 or -$5 located at... in the "Shoot Moon" column? If so, what about the other numbers in that column other than $5 and -$5... what should be done with them?
 
Upvote 0
I want to convert the letter "W" to "5" and the letter "L" to "-5" in a column

Hi!

Try this in G4 and copy down

=SUMPRODUCT(B4:D4-A4)+E4+IF(F4="W",5,IF(F4="L",-5,0))

Or

Array Formula - Use Ctrl+Shift+Enter to enter the formula

=SUM(B4:D4-A4,E4,(F4={"W";"L"})*{5;-5})


Markmzz
 
Last edited:
Upvote 0
As markmzz suggests, why bother to replace W/L with 5/-5 in column F? Instead, change the formula in column G. Another example:

=IF(F4="W",SUM(B4-A4,C4-A4,D4-A4,E4) +5,IF(F4="L",SUM(B4-A4,C4-A4,D4-A4,E4) -5,SUM(B4-A4,C4-A4,D4-A4,E4:F4)))
 
Last edited:
Upvote 0
columns a to d are the score for each player. each point equals $1. the person with the lowest score wins. if you shoot the moon you win $5 from each player. if you win the game you win $5 from each player. column g shows my won/loss dollars for each hand. I just need a formula for column f for $ amount won as well as wins and losses
 
Upvote 0
columns a to d are the score for each player. each point equals $1. the person with the lowest score wins. if you shoot the moon you win $5 from each player. if you win the game you win $5 from each player. column g shows my won/loss dollars for each hand. I just need a formula for column f for $ amount won as well as wins and losses

last sentence should read. Need a formuls for column F for $ amount won or lost as well as wins and losses,

Hi!

If I understand what you want now, then the formula below can helps:

In F4 and copy down

=LOOKUP(SUMPRODUCT(B4:D4-A4),{-9999;0;1},{-5;0;5})

Markmzz
 
Upvote 0
last sentence should read. Need a formuls for column F for $ amount won or lost as well as wins and losses,
So now you want two values in one cell? Instead of trying to describe what you want in words, why don't you simply manually fill out Column F on sample worksheet you posted with the value(s) you want in those cells so that we know exactly what you are after without having to guess at what you are trying to describe?
 
Upvote 0

Forum statistics

Threads
1,215,107
Messages
6,123,127
Members
449,097
Latest member
mlckr

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top