Extract last few digits from a cell

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,213
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
I have value in column C5:C9999. It contains alphanumeric along with special characters.
Column D5:D9999 contains numerical +ve integer.
How to extract last D column digits from column C in column E5:E9999?

Ex:
C5=Peter-0085964 D5=6
E5 should be 085964

C6=Peter-0085964 D6=9
E6=r-0085964

How to accomplish?
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
I have value in column C5:C9999. It contains alphanumeric along with special characters.
Column D5:D9999 contains numerical +ve integer.
How to extract last D column digits from column C in column E5:E9999?

Ex:
C5=Peter-0085964 D5=6
E5 should be 085964

C6=Peter-0085964 D6=9
E6=r-0085964

How to accomplish?


=left(find("-")+1,10) 10 is the length of number. if your number`s length is longer, you can write there 100 or more
 
Upvote 0
I have value in column C5:C9999. It contains alphanumeric along with special characters.
Column D5:D9999 contains numerical +ve integer.
How to extract last D column digits from column C in column E5:E9999?

Ex:
C5=Peter-0085964 D5=6
E5 should be 085964

C6=Peter-0085964 D6=9
E6=r-0085964

How to accomplish?


=MID(c5;FIND("-";c5)+1;10)
 
Upvote 0
Shweta is correct with =right(c5,d5), but since you have 9999 lines, you may want to do the right bottom of the cell double click trick instead of dragging.
 
Upvote 0
Shweta is correct with =right(c5,d5), but since you have 9999 lines, you may want to do the right bottom of the cell double click trick instead of dragging.

it is right if length of number constant. but if they are differen for ex. in of them lenght of number 6 and in another 9. there will be wrong result
 
Upvote 0
hsandeep

You seem to have made no comment about the suggestions made by Shweta and Haldoug. Have you tried that method? In what way did it not work?

Aren't these the results you were expecting as described in your first post?

Excel Workbook
CDE
5Peter-00859646085964
6Peter-00859649r-0085964
Last Characters
 
Upvote 0

Forum statistics

Threads
1,214,646
Messages
6,120,715
Members
448,985
Latest member
chocbudda

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top