How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,801
Office Version
  1. 2010
Platform
  1. Windows
Hello, I'm interested in the last digit of the string... If it's a "." or a ";" I need that removing, if it's not a "." or a ";" then I want one cell to the left... So, what formula would I place in C2 so that all my returns are "Assistance to Finland" please...

Sheet3

BC
2Assistance to FinlandAssistance to Finland
3Assistance to Finland.Assistance to Finland
4Assistance to Finland;Assistance to Finland

<colgroup><col style="font-weight:bold; width:30px; "><col style="width:191px;"><col style="width:184px;"></colgroup><tbody>
</tbody>


Excel tables to the web >> Excel Jeanie HTML 4


<strike></strike>
 
Last edited:

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
6,007
Office Version
  1. 2016
Platform
  1. Windows
Hi,

If the "." or ";" is Always at the end of the Text string, use C2 formula.
If there might be Other "." or ";" within the text string that you Don't want removed, but remove the End one, use D5 formula:

<b></b><table cellpadding="2.5px" rules="all" style=";background-color: rgb(255,255,255);border: 1px solid;border-collapse: collapse; border-color: rgb(187,187,187)"><colgroup><col width="25px" style="background-color: rgb(218,231,245)" /><col /><col /><col /></colgroup><thead><tr style=" background-color: rgb(218,231,245);text-align: center;color: rgb(22,17,32)"><th></th><th>B</th><th>C</th><th>D</th></tr></thead><tbody><tr ><td style="color: rgb(22,17,32);text-align: center;">2</td><td style=";">Assistance to Finland</td><td style=";">Assistance to Finland</td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">3</td><td style=";">Assistance to Finland.</td><td style=";">Assistance to Finland</td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">4</td><td style=";">Assistance to Finland;</td><td style=";">Assistance to Finland</td><td style="text-align: right;;"></td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">5</td><td style=";">Assistance. To; Finland</td><td style="text-align: right;;"></td><td style=";">Assistance. To; Finland</td></tr><tr ><td style="color: rgb(22,17,32);text-align: center;">6</td><td style=";">Assistance; to. Finland;</td><td style="text-align: right;;"></td><td style=";">Assistance; to. Finland</td></tr></tbody></table><p style="width:6.4em;font-weight:bold;margin:0;padding:0.2em 0.6em 0.2em 0.5em;border: 1px solid rgb(187,187,187);border-top:none;text-align: center;background-color: rgb(218,231,245);color: rgb(22,17,32)">Sheet579</p><br /><br /><table width="85%" cellpadding="2.5px" rules="all" style=";border: 2px solid black;border-collapse:collapse;padding: 0.4em;background-color: rgb(255,255,255)" ><tr><td style="padding:6px" ><b>Worksheet Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: rgb(255,255,255);border-collapse: collapse; border-color: rgb(187,187,187)"><thead><tr style=" background-color: rgb(218,231,245);color: rgb(22,17,32)"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">C2</th><td style="text-align:left">=SUBSTITUTE(<font color="Blue">SUBSTITUTE(<font color="Red">B2,".",""</font>),";",""</font>)</td></tr><tr><th width="10px" style=" background-color: rgb(218,231,245);color: rgb(22,17,32)">D5</th><td style="text-align:left">=IF(<font color="Blue">OR(<font color="Red">RIGHT(<font color="Green">B5</font>)={".",";"}</font>),LEFT(<font color="Red">B5,LEN(<font color="Green">B5</font>)-1</font>),B5</font>)</td></tr></tbody></table></td></tr></table><br />
 
Last edited:

How_Do_I

Well-known Member
Joined
Oct 23, 2009
Messages
1,801
Office Version
  1. 2010
Platform
  1. Windows
Thanks again jtakw… You've contributed so much to what I'm trying to do...!
 

jtakw

Well-known Member
Joined
Jun 29, 2014
Messages
6,007
Office Version
  1. 2016
Platform
  1. Windows
You're welcome, glad to help, and thanks for the feedback.
 

Watch MrExcel Video

Forum statistics

Threads
1,129,272
Messages
5,635,217
Members
416,847
Latest member
inaramos

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