#1   Report Post  
Kyli
 
Posts: n/a
Default =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
  #2   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

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

  #3   Report Post  
Kyli
 
Posts: n/a
Default

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

  #4   Report Post  
JE McGimpsey
 
Posts: n/a
Default

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

  #5   Report Post  
Peo Sjoblom
 
Posts: n/a
Default

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



  #6   Report Post  
Kyli
 
Posts: n/a
Default

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


  #7   Report Post  
Kyli
 
Posts: n/a
Default

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

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM
clock Wildman Excel Worksheet Functions 2 April 26th 05 10:31 AM
Need a ISWorkday Function -- Any Ideas Mark Excel Worksheet Functions 5 March 29th 05 01:58 AM
Conversion SVC Excel Worksheet Functions 9 February 28th 05 02:29 PM


All times are GMT +1. The time now is 02:58 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"