Simple "IF" Formula help

south0085

Board Regular
Joined
Aug 15, 2011
Messages
141
Thank you for your time. I need help with, what should be, a simple formula. But for some reason, I can't figure it out today. My formula is in cell E13. I want the formula to do this:

If, in cell D13, the farthest right character is an "S",

then, return everything that's to the left of that "S",

If it does not end with an "S",

then, simply return the entire content of D13.

Thank you!
 

Excel Facts

Spell Check in Excel
Press F7 to start spell check in Excel. Be careful, by default, Excel does not check Capitalized Werds (whoops)
Try

=IF(RIGHT(D13)="S",LEFT(D13,LEN(D13)-1),D13)

or

=LEFT(D13,LEN(D13)-(RIGHT(D13)="S"))
 
Upvote 0
Try

=IF(RIGHT(D13)="S",LEFT(D13,LEN(D13)-1),D13)

or

=LEFT(D13,LEN(D13)-(RIGHT(D13)="S"))

Crap, it was the "-1". That's the part I couldn't figure out. Thank you for helping me.

I do have another question, if you don't mind. I need a formula like this, but I need it to return a blank value or a zero if it's false, rather than "false"

If A13="RESIN", or if A13="Parts", or if A13="Package", then do: vlookup(E13,Y:Z,2,false)

If false, return a blank or "0".
 
Upvote 0

Forum statistics

Threads
1,223,911
Messages
6,175,327
Members
452,635
Latest member
laura12345

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