Left

ExcelRoy

Well-known Member
Joined
Oct 2, 2006
Messages
2,540
Office Version
  1. 365
Platform
  1. Windows
Hi,

How could I remove the first 2 characters to a cell

I was thinking LEFT but not sure

Thanks
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
If you want to remove the first 2 characters and leave the rest, try =RIGHT(A1,LEN(A1)-2)

If you only want the first 2 characters, try =LEFT(A1,2)
 
Last edited:
Upvote 0
Hi All,

Just thinking one step further,

If the user sometimes has the first 2 characters and sometimes not is there a way to remove the 2 as per above, but if it is just numbers to ignore the first 2 removed

ie

Entered as AA12345, but next day entered as 12345

I would ideally like the AA removed but 12345 left as it is

Thanks
 
Upvote 0
Hi All,

Just thinking one step further,

If the user sometimes has the first 2 characters and sometimes not is there a way to remove the 2 as per above, but if it is just numbers to ignore the first 2 removed

ie

Entered as AA12345, but next day entered as 12345

I would ideally like the AA removed but 12345 left as it is

Thanks

Possibly

=IF(ISNUMBER(A1),A1,RIGHT(A1,LEN(A1)-2))

or

=IF(ISNUMBER(A1),A1,RIGHT(A1,LEN(A1)-2)+0) if you want to convert it from text to a number
 
Last edited:
Upvote 0

Forum statistics

Threads
1,213,536
Messages
6,114,211
Members
448,554
Latest member
Gleisner2

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