Replace

Jpernice

Board Regular
Joined
Mar 23, 2010
Messages
117
Hello


I need help will a find a replace,

<TABLE style="WIDTH: 352pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=468 border=0><COLGROUP><COL style="WIDTH: 176pt; mso-width-source: userset; mso-width-alt: 8557" span=2 width=234><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 176pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=234 height=17>Invoice Number
A1 B1
</TD><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 176pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=234></TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>1001797734-81769</TD><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent">-81769</TD></TR></TBODY></TABLE>

I need remove the back end of A1 that is column b1. I use text to column it not work because some invoices number have two "-"

Thanks for your
JP
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Hello


I need help will a find a replace,

<TABLE style="WIDTH: 352pt; BORDER-COLLAPSE: collapse" cellSpacing=0 cellPadding=0 width=468 border=0><COLGROUP><COL style="WIDTH: 176pt; mso-width-source: userset; mso-width-alt: 8557" span=2 width=234><TBODY><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 176pt; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" width=234 height=17>Invoice Number
A1 B1

</TD><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; WIDTH: 176pt; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent" width=234></TD></TR><TR style="HEIGHT: 12.75pt" height=17><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; HEIGHT: 12.75pt; BACKGROUND-COLOR: transparent" height=17>1001797734-81769</TD><TD style="BORDER-RIGHT: #ece9d8; BORDER-TOP: #ece9d8; BORDER-LEFT: #ece9d8; BORDER-BOTTOM: #ece9d8; BACKGROUND-COLOR: transparent">-81769</TD></TR></TBODY></TABLE>

I need remove the back end of A1 that is column b1. I use text to column it not work because some invoices number have two "-"

Thanks for your
JP
See if this does what you want:

Book1
AB
11001797734-8176981769
210023-568-12341234
312345-6789067890
42389-1-120-123123
Sheet1

This formula entered in B1 and copied down:

=SUBSTITUTE(RIGHT(SUBSTITUTE(A1,"-",REPT("-",100)),100),"-","")

It will extract all text after the LAST (rightmost) dash (hyphen).

The value returned is a TEXT string.
 
Upvote 0

Forum statistics

Threads
1,224,602
Messages
6,179,844
Members
452,948
Latest member
UsmanAli786

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