Sum and subtract columns when one cell contains preceding text

K

K Tuck

I need to add columns: A1=JA1098027 and B1=6, then subtract C1=1. All of
column A contains 1-3 letters preceding the number so nothing I've tried
works. Columns B and C are numeric only. Anyone know the secret formula for
this one? Thanks.
 
G

Glenn

K said:
I need to add columns: A1=JA1098027 and B1=6, then subtract C1=1. All of
column A contains 1-3 letters preceding the number so nothing I've tried
works. Columns B and C are numeric only. Anyone know the secret formula for
this one? Thanks.


This array formula (commit with CTRL+SHIT+ENTER) should give you the correct answer:

=MID(A1,MATCH(1,--NOT(ISERROR(MID(A1,ROW(INDIRECT("1:"&LEN(A1))),1)*1)),0),LEN(A1))+B1-C1
 
K

K Tuck

By the way, Mike H's suggested formula did not work. It results in #N/A so
anything you can suggest is very much appreciated. Thanks.
 

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