Pull month and year index for each day of that month and year

askall1000

Board Regular
Joined
Jan 3, 2019
Messages
58
Office Version
  1. 2016
Platform
  1. Windows
Hello, would you help me about formula to pull index base on month and year to a list which contains days, month and year; so every day for that month and year have same index number. Thank you very much in advance.


Book4
BC
2Date (day/mm/year format)Indeks
301.01.20041,54
401.02.20041,64
5
6Date (day/mm/year format)Indeks
701.01.20041,54
802.01.20041,54
903.01.20041,54
1004.01.20041,54
1105.01.20041,54
1206.01.20041,54
1307.01.20041,54
1408.02.20041,64
1509.02.20041,64
1610.02.20041,64
1711.02.20041,64
1812.02.20041,64
1913.02.20041,64
2014.02.20041,64
Sheet1
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN
I find this formula from internet and adopted to my list and it works who might be need in the future SUMPRODUCT((YEAR(D24)=YEAR(100!$B$2:$B$228))*(MONTH(D24)=MONTH(100!$B$2:$B$228));(100!$D$2:$D$228)), but if there is alternative please share. Thank you.
 
Upvote 0
The formula you published do not reflect your sample data :(.

I've prepared an answer assuming that you look for formula in C7 (and copied down) in your sample . Such formula shall do:
Excel Formula:
=VLOOKUP(EOMONTH(B7,-1)+1,$B$3:$C$4,2,0)

On the other hand, if you would look for C3 (and copy down) formula then it would be:
Excel Formula:
=INDEX($C$7:$C$20,MATCH(B3,$B$7:$B$20)+(COUNTIF($B$7:$B$20,B3)=0))
 
Upvote 0
Solution
Hi Kaper, yes you are right, apologize for misunderstanding. My formula is base on index on sheet 100, I shared sample in one sheet then with the solution from forum, i can revize it according to my worksheet. The shared solution base on my worksheet. Also Thank you very much for your replies, much appreciated.
 
Upvote 0

Forum statistics

Threads
1,215,016
Messages
6,122,700
Members
449,092
Latest member
snoom82

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