Search formula showing results plus 100 characters

D

Deb

I use a formula to find text in a particular text and ask the results plus
the next 100 characters to display in another cell. I was wondering if there
was a way to show the proceeding characters. The formula i am using is:

=MID($G6&$H6,SEARCH(C$2,$G6&$H6),100)
 
J

JLatham

Assuming that the formula you have shown is in cell D2, then a formula like
this would do the trick:
=IF(LEN(D2)>0,LEFT(G$6&H$6,LEN(G$6&H$6)-LEN(D2)),"")

However, if D2 (your formula) comes up with an error because the contents of
C$2 isn't found in G$6 & H$6, then the formula above will display the same
error.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top