I have the following text string.
What formula can I use to extract these results on the right?
Sample file.xlsx
I have the following text string.
What formula can I use to extract these results on the right?
Sample file.xlsx
You have no set of rule for extracting the text, so its quite difficult to come up with a formula to do that. It would be better if you explain the expected output to let us know that on what conditions you expect these outputs. Its clear for some but not for all.
Regards
sktneer
Treat people the way you want to be treated. Talk to people the way you want to be talked to.
Respect is earned NOT given.
may be this can help............
=LEFT(A2,FIND("·",A2,1)-1)
Hi sktneer,
Thanks for the feedback. Bascially what I am looking for is to extract the last account number (sub account) of the text string.
In this Text string: 613000 · Non Income Tax Expense:613005 · Property Tax Expense:613005A · Property Tax Expense (CS)
It is viewed as such:-
613000 · Non Income Tax Expense
∟ 613005 · Property Tax Expense
∟ 613005A · Property Tax Expense (CS)
So 613005A is my expected result.
Hope this clarifies.
This is clunky play, but FWIW ....
Place in
K2: =SEARCH(":",A2,L2+1)
L2: =SEARCH(":",A2,M2+1)
M2: =SEARCH(":",A2)
N2: =INDEX(K2:M2,MATCH(TRUE,INDEX(K2:M2<>"#VALUE!",),0))
O2: =MID(A2,N2+1,7)
P2: =IF(ISNA(O2),LEFT(A2,7),O2)
Q2: =IF(ISNUMBER(LEFT(P2)+0),P2,MID(A2,M2+1,7))
Copy K2:Q2 down to Q13. Col Q seems to deliver the indicated results ....
---------------------------
Any good? Wave it, click on the little star at the bottom left of my responses
pls insert formula in l2 as randbetween(1,6) and in the k2 pls use formula as =IF(LEN(LEFT(A2,FIND("·",A2,1)-1))=7,LEFT(A2,FIND("·",A2,1)-1)&LOOKUP(L2,{1,2,3,4,5,6,7},{"A","B","C","D","E","F"}),IF(LEN(LEFT(A2,FIND("·",A2,1)-1))=8,LEFT(A2,FIND("·",A2,1)-1)," "))
Pl see attached file.
This formula gives the same result as your sample file (enter it with Shift-Ctrl-Enter):
=TRIM(MID(A1,LEN(A1)-4-MATCH(TRUE,ISNUMBER(--MID(A1,LEN(A1)+1-ROW(INDIRECT("1:"&LEN(A1))),1)),0),7))
Thank you so much for the answers! Though I hope to understand one day how to decode it so that I can accommodate amendments if required.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks