Extracting the rest of a cell if the first character matches a value

laundon

New Member
Joined
Jan 5, 2005
Messages
18
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hello,

I have a spreadsheet, and a cell starts with either ">"or "<" and then followed by a string, for example ">ABC123" or "<XYZ123". I need to analyse the first character, and depending on whether it's true or not, extract the remaining cell information.

In English, the command would be, If cell A1 starts with a ">" then extract the remaining characters after the ">" or else return blank.

Any ideas you lovely people!

Many Thanks,
Tim.
:)
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Does this formula do what you want...

=IF(LEFT(A1)=">",MID(A1,2,LEN(A1)),"")
 
Upvote 0
Superb! Thank you so much!
It actually looks straight forward now you've shown me, but I just couldn't get my head around it!

Thanks once again :)
 
Upvote 0

Forum statistics

Threads
1,224,824
Messages
6,181,186
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