month/date conversion

bflan0524

Board Regular
Joined
Oct 7, 2016
Messages
193
Office Version
  1. 2010
i know there are various conversion formulas available
is there something i can use that for example if column A row 1 showed a date of 10/16/2018 in column B i could convert to 201810

ty
 

Excel Facts

Do you hate GETPIVOTDATA?
Prevent GETPIVOTDATA. Select inside a PivotTable. In the Analyze tab of the ribbon, open the dropown next to Options and turn it off
Hello,

You can test =year(A1)&month(A1)

HTH
 
Upvote 0
quick follow up, for single digit months is there a way to get a 0 before the # so instead of 20181 it would show 201801
 
Upvote 0
hello
one more if you dont mind haha. if i had one column display 201810 for a month and another 201701 and i wanted to determine the difference in months. if i just subtracted them i would get 109, when in reality its a difference of 21 months, is there a way to get it to display the 21
 
Upvote 0
Shame you did not perform the date difference ... before your transformation to Text ....:(

Have a go with following : =((VALUE(LEFT(A1,4))-VALUE(LEFT(B1,4)))*12)+ABS(RIGHT(A1,2)-RIGHT(B1,2))

HTH
 
Upvote 0
that worked, perfect ty
can you tell me what exactly that does, so i can learn it rather then just have somebody tell me haha and i have to bother you guys less haha
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,159
Members
453,021
Latest member
Justyna P

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