Indexed time

JeanM01

New Member
Joined
Jun 10, 2015
Messages
9
Hi everyone,

I am trying to write a code or function that will index the the time. I have data ranging from January 2012 to December 2014. I'd like to place in a column nearby it that if it's Jan-2012 then give me 1, if Feb-2012 then give me 2,...,Dec-2014 give me 36. Is there a way to do this? Thanks in advance!

Jean
 

Excel Facts

Add Bullets to Range
Select range. Press Ctrl+1. On Number tab, choose Custom. Type Alt+7 then space then @ sign (using 7 on numeric keypad)
Hi, Just a guess..


Excel 2012
AB
201-Jan-20121
313-Jan-20121
425-Jan-20121
506-Feb-20122
618-Feb-20122
701-Mar-20123
813-Mar-20123
925-Mar-20123
1006-Apr-20124
1118-Apr-20124
1230-Apr-20124
1312-May-20125
1424-May-20125
1505-Jun-20126
1617-Jun-20126
1729-Jun-20126
1811-Jul-20127
1923-Jul-20127
2004-Aug-20128
2116-Aug-20128
2228-Aug-20128
2309-Sep-20129
2421-Sep-20129
2503-Oct-201210
2612-Dec-201436
Basesheet
Cell Formulas
RangeFormula
B2=MONTH(A2)*(YEAR(A2)-YEAR($A$2)+1)
 
Upvote 0
Hi, Just a guess..

Excel 2012
AB
201-Jan-20121
313-Jan-20121
425-Jan-20121
506-Feb-20122
618-Feb-20122
701-Mar-20123
813-Mar-20123
925-Mar-20123
1006-Apr-20124
1118-Apr-20124
1230-Apr-20124
1312-May-20125
1424-May-20125
1505-Jun-20126
1617-Jun-20126
1729-Jun-20126
1811-Jul-20127
1923-Jul-20127
2004-Aug-20128
2116-Aug-20128
2228-Aug-20128
2309-Sep-20129
2421-Sep-20129
2503-Oct-201210
2612-Dec-201436

<colgroup><col style="width: 25pxpx"><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Basesheet

Worksheet Formulas
CellFormula
B2=MONTH(A2)*(YEAR(A2)-YEAR($A$2)+1)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
This formula won't work: Jan 2013 =13 but your formula 1*(2) =2
But I did find another function
=MATCH(Date, array)
Thank you for answering!
 
Upvote 0

Forum statistics

Threads
1,214,614
Messages
6,120,519
Members
448,968
Latest member
Ajax40

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