Copying a specific part of a text string into a different cell

eDarren

New Member
Joined
Sep 5, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
1693912326019.png


I have a spreadsheet that I have created that is used to import a text file with text strings. The intention of the spreadsheet is to take bits of information from the text file and compose it into a more human readable format. For example, the above text string I would like to extract the tag description Under Voltage and put it into a table on a different sheet so I can see what the tag has been labelled as. My issue is that the wording Under Voltage is liable to change. It can be renamed in a different text file, and called "Voltage Under Range" for instance, so I want to be able to take the text inside the > < whatever that may be, and move it into a different cell. Is there a way to do this? I have used functions like mid, etc but they are reliant on the text remaining exactly as it is above which isn't likely if somebody renames the tag. I'm happy to achieve this via VBA or Formula.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Hi & welcome to MrExcel.
For that string how about
Excel Formula:
=TEXTBEFORE(TEXTAFTER(A2,">"),"<")
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,106
Messages
6,123,124
Members
449,097
Latest member
mlckr

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