Replace a string

kingsushi001

New Member
Joined
Oct 24, 2017
Messages
13
Office Version
  1. 2016
Platform
  1. Windows
Good day everyone

Can someone please help me with the following...

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][TABLE="width: 568"]
<tbody>[TR]
[TD="class: xl63, width: 568"]http://www.xyz.co.za/ProdImg/AA13NDfl1uuL2c.jpg[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 568"]
<tbody>[TR]
[TD="class: xl65, width: 568"]http://www.africaestore.com/esquire/AA13NDfl1uuL2c.jpg[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][TABLE="width: 568"]
<tbody>[TR]
[TD="class: xl65, width: 568"]http://www.esquireshop.co.za/ProdImg/WDBYFT0020BB.jpg[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][TABLE="width: 568"]
<tbody>[TR]
[TD="class: xl65, width: 568"]http://www.africaestore.com/esquire/WDBYFT0020BB.jpg

[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

I need to change A1 and A2 to look like B1 and B2. Basically just replacing before the last /
Is there a function or combination of functions I can use to achieve this?

Any help would be greatly appreciated.
 
Good day everyone

Can someone please help me with the following...

[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD][TABLE="width: 568"]
<tbody>[TR]
[TD="class: xl63, width: 568"]http://www.xyz.co.za/ProdImg/AA13NDfl1uuL2c.jpg[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="width: 568"]
<tbody>[TR]
[TD="class: xl65, width: 568"]http://www.africaestore.com/esquire/AA13NDfl1uuL2c.jpg[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD][TABLE="width: 568"]
<tbody>[TR]
[TD="class: xl65, width: 568"]http://www.esquireshop.co.za/ProdImg/WDBYFT0020BB.jpg[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD][TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD][TABLE="width: 568"]
<tbody>[TR]
[TD="class: xl65, width: 568"]http://www.africaestore.com/esquire/WDBYFT0020BB.jpg
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

I need to change A1 and A2 to look like B1 and B2. Basically just replacing before the last /
Is there a function or combination of functions I can use to achieve this?

Any help would be greatly appreciated.

Ok, so I have another problem I can't seem to solve.

Some of the URL's contains a sub folder like this
[TABLE="width: 452"]
<tbody>[TR]
[TD]http://www.xyz.co.za/ProdImg/AR-AS5520X4/AR-AS5520X4.jpg[/TD]
[/TR]
</tbody>[/TABLE]

I need it to be the same as my original post. Like so http://www.africaestore.com/esquire/AR-AS5520X4.jpg

Any ideas?
 
Upvote 0

Excel Facts

Select all contiguous cells
Pressing Ctrl+* (asterisk) will select the "current region" - all contiguous cells in all directions.
Some of the URL's contains a sub folder like this
[TABLE="width: 452"]
<tbody>[TR]
[TD]http://www.xyz.co.za/ProdImg/AR-AS5520X4/AR-AS5520X4.jpg
[/TD]
[/TR]
</tbody>[/TABLE]

Hi, here is one option:


Excel 2013/2016
AB
1http://www.xyz.co.za/ProdImg/AA13NDfl1uuL2c.jpghttp://www.africaestore.com/esquire/AA13NDfl1uuL2c.jpg
2http://www.esquireshop.co.za/ProdImg/WDBYFT0020BB.jpghttp://www.africaestore.com/esquire/WDBYFT0020BB.jpg
3http://www.xyz.co.za/ProdImg/AR-AS5520X4/AR-AS5520X4.jpghttp://www.africaestore.com/esquire/AR-AS5520X4.jpg
4http://www.xyz.co.za/A/B/C/D/E/F/G/H/I/AR-AS5520X4.jpghttp://www.africaestore.com/esquire/AR-AS5520X4.jpg
Sheet1
Cell Formulas
RangeFormula
B1="http://www.africaestore.com/esquire/" &TRIM(RIGHT(SUBSTITUTE(A1,"/",REPT(" ",99)),99))
 
Upvote 0
Dear Sir,

Apologies for replying on this thread , i was not able to figure our how to start a new thread, hence I replied on this one

The 6 line come in 6 different cells , basically the attached image represents a fare which i need to extract specific numbers only

0
 
Upvote 0
Hi, here is one option:

Excel 2013/2016
AB
http://www.xyz.co.za/ProdImg/AA13NDfl1uuL2c.jpg
http://www.esquireshop.co.za/ProdImg/WDBYFT0020BB.jpghttp://www.africaestore.com/esquire/WDBYFT0020BB.jpg
http://www.xyz.co.za/ProdImg/AR-AS5520X4/AR-AS5520X4.jpghttp://www.africaestore.com/esquire/AR-AS5520X4.jpg
http://www.xyz.co.za/A/B/C/D/E/F/G/H/I/AR-AS5520X4.jpghttp://www.africaestore.com/esquire/AR-AS5520X4.jpg

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
[TD="align: center"]1[/TD]

[TD="bgcolor: #FFFF00"]http://www.africaestore.com/esquire/AA13NDfl1uuL2c.jpg[/TD]

[TD="align: center"]2[/TD]

[TD="align: center"]3[/TD]

[TD="align: center"]4[/TD]

</tbody>
Sheet1

[TABLE="width: 85%"]
<tbody>[TR]
[TD]Worksheet Formulas[TABLE="width: 100%"]
<thead>[TR="bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]
[TH="width: 10px"]Cell[/TH]
[TH="align: left"]Formula[/TH]
[/TR]
</thead><tbody>[TR]
[TH="width: 10px, bgcolor: [URL=https://www.mrexcel.com/forum/usertag.php?do=list&action=hash&hash=DAE7F5]#DAE7F5[/URL] "]B1[/TH]
[TD="align: left"]="http://www.africaestore.com/esquire/" &TRIM(RIGHT(SUBSTITUTE(A1,"/",REPT(" ",99)),99))[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[/TR]
</tbody>[/TABLE]

Thank you very much. Worked awesomely:)
 
Upvote 0
Thank you very much. Worked awesomely:)

Great, good to hear :)

i was not able to figure our how to start a new thread

Click the brownish "+ Post New Thread" button towards the top left of the page linked below.

https://www.mrexcel.com/forum/excel-questions/

the attached image represents a fare which i need to extract specific numbers only

Images are not a good way to show your data - see the link below for a few better methods of sharing your expected results.

https://www.mrexcel.com/forum/about-board/508133-attachments.html
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,184
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

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