Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Junior Member
 
Posts: 7
Default Reading the last for characters of a data.

Hello. I have a list of values in a data that has 16 characters of numbers and letters (ie. 01V4245608099269). The only numbers/letters I need are the last 6 of the list. How would I create a formula that reads only the last 6?
  #2   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by DamienPham View Post
Hello. I have a list of values in a data that has 16 characters of numbers and letters (ie. 01V4245608099269). The only numbers/letters I need are the last 6 of the list. How would I create a formula that reads only the last 6?
=RIGHT(cell,6)

Change cell for the relevant cell reference. For example =RIGHT(A1,6)
  #3   Report Post  
Junior Member
 
Posts: 7
Default

Quote:
Originally Posted by Spencer101 View Post
=RIGHT(cell,6)

Change cell for the relevant cell reference. For example =RIGHT(A1,6)
Thanks! I was wondering if you could help me with something else too...
So in Column A, I have a list of numbers/letters (ie. 01V4245608099269), I want Column B to read the last 6 characters of Column A and if the number is 256, Column B should say Type1. If the number is 786, Column B should say Type2. Is this possible? How would I do that?
  #4   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by DamienPham View Post
Thanks! I was wondering if you could help me with something else too...
So in Column A, I have a list of numbers/letters (ie. 01V4245608099269), I want Column B to read the last 6 characters of Column A and if the number is 256, Column B should say Type1. If the number is 786, Column B should say Type2. Is this possible? How would I do that?
I dont understand how the last 6 characters would be a 3 digit number. Could you explain a little more?
  #5   Report Post  
Junior Member
 
Posts: 7
Default

Quote:
Originally Posted by Spencer101 View Post
I dont understand how the last 6 characters would be a 3 digit number. Could you explain a little more?
The Type (Type1, Type2, etc) can either be 2 or 3 digits. However, it's within the last 6 digits of the data. So if I'm looking for 256, it could be BKA256, or 256123, or B256KA. I hope this makes sense...


  #6   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by DamienPham View Post
The Type (Type1, Type2, etc) can either be 2 or 3 digits. However, it's within the last 6 digits of the data. So if I'm looking for 256, it could be BKA256, or 256123, or B256KA. I hope this makes sense...
Which version of Excel are you using, Damien?
  #7   Report Post  
Junior Member
 
Posts: 7
Default

Quote:
Originally Posted by Spencer101 View Post
Which version of Excel are you using, Damien?
Excel 2010.
  #8   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by DamienPham View Post
Excel 2010.
Sorry for all the questions, but the explanation was slightly bereft of detail.

So you're looking for Type 1 if the last 6 digits contain 256 and Type 2 if the last 6 digits contain 786. What happens if neither appear in the last 6 digits?

Also, are there values for Type 3, Type 4 etc or just the 2 types?
  #9   Report Post  
Junior Member
 
Posts: 7
Default

Quote:
Originally Posted by Spencer101 View Post
Sorry for all the questions, but the explanation was slightly bereft of detail.

So you're looking for Type 1 if the last 6 digits contain 256 and Type 2 if the last 6 digits contain 786. What happens if neither appear in the last 6 digits?

Also, are there values for Type 3, Type 4 etc or just the 2 types?
No, no problem at all. Any information would be helpful. What I'm doing is pulling a report (through another program) that gives out a long list of serial numbers (ie. 01V42466220BH315). These serial numbers are the machines that we have out in the field. From these serial numbers, the last 6 characters will identify what type of machine it is (there are 14 types). If the numbers do not match one of the 14 types, then the machine is not serviced by our location. I have 14 point of contacts (1 for each type of machine). What I'm trying to do-- get EXCEL to read the last 6 digits of the serial number, determine what type it is, and list the point of contact for that type. So I'm pasting the serial numbers into Column A. I want Column B to read the last 6 digits of Column A and determine the type of machine it is. (Of the last six digits, only three in a specific order are important [ie. LOOK for 236 from BK2365]) Then, I would like for Column C to read the type on Column B and determine who the point of contact is.

I hope this is more clear...
  #10   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by DamienPham View Post
No, no problem at all. Any information would be helpful. What I'm doing is pulling a report (through another program) that gives out a long list of serial numbers (ie. 01V42466220BH315). These serial numbers are the machines that we have out in the field. From these serial numbers, the last 6 characters will identify what type of machine it is (there are 14 types). If the numbers do not match one of the 14 types, then the machine is not serviced by our location. I have 14 point of contacts (1 for each type of machine). What I'm trying to do-- get EXCEL to read the last 6 digits of the serial number, determine what type it is, and list the point of contact for that type. So I'm pasting the serial numbers into Column A. I want Column B to read the last 6 digits of Column A and determine the type of machine it is. (Of the last six digits, only three in a specific order are important [ie. LOOK for 236 from BK2365]) Then, I would like for Column C to read the type on Column B and determine who the point of contact is.

I hope this is more clear...
What you're trying to do makes perfect sense now. Exactly HOW you do that is still a little fuzzy in my brain.

Leave it with me and hopefully I'll be back soon with an answer.
Failing that, someone else may pop up and help you out.

Just for convenience sake, what are the 14 three digit codes in question?


  #11   Report Post  
Junior Member
 
Posts: 7
Default

Quote:
Originally Posted by Spencer101 View Post
What you're trying to do makes perfect sense now. Exactly HOW you do that is still a little fuzzy in my brain.

Leave it with me and hopefully I'll be back soon with an answer.
Failing that, someone else may pop up and help you out.

Just for convenience sake, what are the 14 three digit codes in question?
205, 209, 235, 236, 237, 238, 239, BH1, BV6, ANR, ANP, FW3, BK1, BK2
  #12   Report Post  
Senior Member
 
Posts: 663
Default

Quote:
Originally Posted by DamienPham View Post
205, 209, 235, 236, 237, 238, 239, BH1, BV6, ANR, ANP, FW3, BK1, BK2

As luck would have it, whilst trawling through several other forums for the answer to this, someone asked almost exactly the same question.

So I took that formula and adapted it slightly to fit your needs.

With this version you don't even need the column B that extracts just the last six digits, it merely searches the last six digits of each entry in column A directly.

Hopefully you can adapt it to meet the requirements of your specific workbook, although I'm happy to assist you with that too if need be.

Please don't ask me to explain exactly how it works as I'm still trying to fathom that myself :)
Attached Files
File Type: zip DamienPham Example.zip (6.1 KB, 37 views)
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
Reading range w/ 255+ characters throws error jarabe28 Excel Programming 4 April 14th 09 04:39 PM
Reading the characters in a cell dstiefe Excel Programming 2 November 20th 08 01:01 AM
Reading data arrays from multiple data files in excel Hankjam[_2_] Excel Discussion (Misc queries) 0 February 7th 08 08:29 PM
Reading data from PPT and purge data to Excel and image [email protected] Excel Programming 1 January 17th 08 06:04 AM
Excel OLEDB reading Chinese characters problem [email protected] Excel Programming 0 September 12th 06 04:42 AM


All times are GMT +1. The time now is 05:43 AM.

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"