adding letter at the end in some cells

pretty_peter

New Member
Joined
Sep 15, 2014
Messages
2
Hi!


I have two problems with my work.
My columns look like this:
Player/lvl(A) score(B) diff(C)
jake/B 110 hard
jack/G 550 easy
greg/C 234 medium
dan/D 904 easy
paul/ 201 hard
stef/I 420 medium


As you see in some player columns there is no letter after /.
I would like to rewrite it and add letter A where there is nothing after
slash. The second thing is to add some values to score. If diff is medium add 50 and for hard 100. Nothing extra for easy. I tried IF and LOOKUP with this but can't manage to do this. And the new values should be in new columns (D and E for example).


thanks for help
Peter
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Welcome to MrExcel.

Try these formulas in D2 and E2 copied down:

=IF(RIGHT(A2,1)="/",A2&"A",A2)

=B2+LOOKUP(C2,{"easy","hard","medium"},{0,100,50})
 

mretyk

New Member
Joined
May 6, 2014
Messages
4
Try this:
D2 = A2&IF(RIGHT(A2,1)="/","A","")

For the score you can use double IF
E2=B2+IF(C2="medium",50,IF(C2="hard",100,0))
 
Master Excel Bundle

Excel contains over 450 functions, with more added every year. That’s a huge number, so where should you start? Right here with this bundle.

Forum statistics

Threads
1,164,305
Messages
5,836,539
Members
430,436
Latest member
Emilycr

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
Top