0

Original link: Extracting Data Between two Characters in Excel

I have a combination of cells where some have nicknames and some are without nicknames.

Some will have nickname < > emails and some will just be an email address. If I copy and paste the following into the whole row, some cells will be empty:

=IFERROR(MID(LEFT(A1, FIND(">", A1)-1), FIND("<", A1)+1, LEN(A1)), "") 

If a particular cell does not contain < and >, I would like the formula to just take an exact copy and paste it with the same row as the others so I can just copy and paste the whole row without checking whether some cells are empty.

How can I achieve this?

enter image description here

4
  • Please show some sample data and your desired result
    – nixda
    Aug 2, 2015 at 17:25
  • @Aaron Are you just trying to strip out the < > symbols? Aug 2, 2015 at 19:12
  • COLUMN A4, B4 & D4 works fine but C4 is empty as cell C1 do not have any nickname/first or last name and no < > that is why C4 is empty.
    – Aaron
    Aug 3, 2015 at 2:21

1 Answer 1

1

All you need to do is replace the last "" with A1 so that if excel doesn’t find a < or > it will return the entire contents of A1 instead of blank:

=IFERROR(MID(LEFT(A1, FIND(">", A1)-1), FIND("<", A1)+1, LEN(A1)),A1)
1
  • Aaron, is this a satisfied answer? If yes, please mark as accepted. Otherwise, please edit your question to describe what’s not working.
    – User15
    Aug 4, 2015 at 17:14

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .