ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   =mid function (https://www.excelbanter.com/excel-worksheet-functions/28239-%3Dmid-function.html)

Kyli

=mid function
 
I need to use the mid function, but counting from the right to left. I know
it's generally: =mid(cell, start #, # of characters)

I need to go: =mid(right(cell, # of characters))
or something to that extent. Please help. : )

Thanks, Kyli

Peo Sjoblom

Give us an example of some data and what you want to extract from that data,
all excel find/search functions start from the left but I am sure it can be
done regardless


Regards,

Peo Sjoblom

"Kyli" wrote:

I need to use the mid function, but counting from the right to left. I know
it's generally: =mid(cell, start #, # of characters)

I need to go: =mid(right(cell, # of characters))
or something to that extent. Please help. : )

Thanks, Kyli


Kyli

Patient A - 1234
Patientabc Babc - 9876

I need the next column to contain 1234 and 9876.

Thanks! Kyli

"Peo Sjoblom" wrote:

Give us an example of some data and what you want to extract from that data,
all excel find/search functions start from the left but I am sure it can be
done regardless


Regards,

Peo Sjoblom

"Kyli" wrote:

I need to use the mid function, but counting from the right to left. I know
it's generally: =mid(cell, start #, # of characters)

I need to go: =mid(right(cell, # of characters))
or something to that extent. Please help. : )

Thanks, Kyli


JE McGimpsey

If the values will always be 4 digits:

=RIGHT(A1, 4)

If not,

=MID(A1, FIND("-",A1)+2,255)

where 255 is just a large number.


In article ,
"Kyli" wrote:

Patient A - 1234
Patientabc Babc - 9876

I need the next column to contain 1234 and 9876.

Thanks! Kyli

"Peo Sjoblom" wrote:

Give us an example of some data and what you want to extract from that
data,
all excel find/search functions start from the left but I am sure it can be
done regardless


Regards,

Peo Sjoblom

"Kyli" wrote:

I need to use the mid function, but counting from the right to left. I
know
it's generally: =mid(cell, start #, # of characters)

I need to go: =mid(right(cell, # of characters))
or something to that extent. Please help. : )

Thanks, Kyli


Peo Sjoblom

Does it always end with a number (no letter after the number) and you always
want the number? If so you can use

=--MID(A1,MATCH(TRUE,ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LEN(A1)))
+1,1)),0),255)

entered with ctrl + shift, if there is always a hyphen and a space and then
the number it is easier

=--MID(A1,FIND("-",A1)+2,255)

if you want text representation just remove the -- in the front



and finally if the numbers are always together but can be in different
places you can use


=--MID(A1,MATCH(FALSE,ISERROR(--MID(A1,ROW(INDIRECT("1:100")),1)),0),100-SUM(--ISERROR(1*MID(A1,ROW(INDIRECT("1:100")),1))))

entered with ctrl + shift & enter


regards,

Peo Sjoblom

"Kyli" wrote:

Patient A - 1234
Patientabc Babc - 9876

I need the next column to contain 1234 and 9876.

Thanks! Kyli

"Peo Sjoblom" wrote:

Give us an example of some data and what you want to extract from that data,
all excel find/search functions start from the left but I am sure it can be
done regardless


Regards,

Peo Sjoblom

"Kyli" wrote:

I need to use the mid function, but counting from the right to left. I know
it's generally: =mid(cell, start #, # of characters)

I need to go: =mid(right(cell, # of characters))
or something to that extent. Please help. : )

Thanks, Kyli


Kyli

Awesome! That worked out just right. (Um, no pun was really intended...)
Thank-you! Kyli


"JE McGimpsey" wrote:

If the values will always be 4 digits:

=RIGHT(A1, 4)

If not,

=MID(A1, FIND("-",A1)+2,255)

where 255 is just a large number.


In article ,
"Kyli" wrote:

Patient A - 1234
Patientabc Babc - 9876

I need the next column to contain 1234 and 9876.

Thanks! Kyli

"Peo Sjoblom" wrote:

Give us an example of some data and what you want to extract from that
data,
all excel find/search functions start from the left but I am sure it can be
done regardless


Regards,

Peo Sjoblom

"Kyli" wrote:

I need to use the mid function, but counting from the right to left. I
know
it's generally: =mid(cell, start #, # of characters)

I need to go: =mid(right(cell, # of characters))
or something to that extent. Please help. : )

Thanks, Kyli



Kyli

Holy cow! Luckily for me, JE's explanation of
=RIGHT(A1,4)
worked out perfectly for me.

Thanks for your assistance, though!
Kyli

"Peo Sjoblom" wrote:

Does it always end with a number (no letter after the number) and you always
want the number? If so you can use

=--MID(A1,MATCH(TRUE,ISNUMBER(--MID(A1,ROW(INDIRECT("1:"&LEN(A1)))
+1,1)),0),255)

entered with ctrl + shift, if there is always a hyphen and a space and then
the number it is easier

=--MID(A1,FIND("-",A1)+2,255)

if you want text representation just remove the -- in the front



and finally if the numbers are always together but can be in different
places you can use


=--MID(A1,MATCH(FALSE,ISERROR(--MID(A1,ROW(INDIRECT("1:100")),1)),0),100-SUM(--ISERROR(1*MID(A1,ROW(INDIRECT("1:100")),1))))

entered with ctrl + shift & enter


regards,

Peo Sjoblom

"Kyli" wrote:

Patient A - 1234
Patientabc Babc - 9876

I need the next column to contain 1234 and 9876.

Thanks! Kyli

"Peo Sjoblom" wrote:

Give us an example of some data and what you want to extract from that data,
all excel find/search functions start from the left but I am sure it can be
done regardless


Regards,

Peo Sjoblom

"Kyli" wrote:

I need to use the mid function, but counting from the right to left. I know
it's generally: =mid(cell, start #, # of characters)

I need to go: =mid(right(cell, # of characters))
or something to that extent. Please help. : )

Thanks, Kyli



All times are GMT +1. The time now is 12:14 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com