Extract Month numbers from years and remove zero as well

hananak

Board Regular
Joined
Feb 10, 2022
Messages
94
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Dear All,

I have Years with Month numbers in one column. I am trying to extract months from the them but want to remove zero as well. For example. This is the result I want.

202201 = 1
202202 = 2
202203 = 3
202204 = 4
202205 = 5
202206 = 6
202207 = 7
202208 = 8
202209 = 9
202210 = 10
202211 = 11
202212 = 12

When I use right formula to extract 2 digits - I get 01 instead of 1. How to remove this 0? This mentioned below is my current result.

202201 = 01
202202 = 02
202203 = 03
202204 = 04
202205 = 05
202206 = 06
202207 = 07
202208 = 08
202209 = 09
202210 = 10
202211 = 11
202212 = 12

Your help would be really appreciated.
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
Just add zero to your formula and that will convert them into real numbers...

=0+RIGHT(A1,2)
 
Upvote 0

Forum statistics

Threads
1,217,259
Messages
6,135,512
Members
449,945
Latest member
noone12344444444

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