Question related to year

%3CLINGO-SUB%20id%3D%22lingo-sub-2154458%22%20slang%3D%22en-US%22%3EQuestion%20related%20to%20year%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2154458%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Everyone%2C%3C%2FP%3E%3CP%3E%3CSPAN%3EI%20am%20just%20wondering%20how%20to%20use%20dcount()%20function%20or%20any%20function%20that%20could%20result%20to%20find%20the%20count%20of%20the%20year%20as%20shown%20below%20in%20the%20picture.%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Screenshot%20(1846).png%22%20style%3D%22width%3A%20823px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F256422iBCC85DFB6311105E%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20role%3D%22button%22%20title%3D%22Screenshot%20(1846).png%22%20alt%3D%22Screenshot%20(1846).png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%20help...%3F%3F%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2154458%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2154757%22%20slang%3D%22en-US%22%3ERe%3A%20Question%20related%20to%20year%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2154757%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F811137%22%20target%3D%22_blank%22%3E%40Zan_Hanifee%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EConsidering%20the%20data%20in%20column%20A%2C%20you%20have%20list%20of%20years%20are%20unique%20%2C%2C%2C%20so%20if%20you%20want%20to%20count%20the%20year%2C%20you%20get%201%20for%20each.%3C%2FP%3E%3CP%3EBut%20I%20don't%20this%20is%20the%20issue%2C%2C%20if%20you%20want%20to%20count%20that%20how%20many%20years%20are%20involved%20to%20get%2036000%20then%20you%20need%20an%20array%20formula%20or%20Solver%20can%20do%20this%20also.%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ESo%20better%20edit%20your%20post%20%26amp%3B%20clear%20the%20issue%2C%2C%2C%20or%20share%20the%20expected%20output%20with%20us.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2154826%22%20slang%3D%22en-US%22%3ERe%3A%20Question%20related%20to%20year%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2154826%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20for%20giving%20the%20solution%3Asmiling_face_with_smiling_eyes%3A%3C%2FP%3E%3CP%3ECan%20you%20please%20explain%20this%20formula%20-%26nbsp%3B%3C%2FP%3E%3CP%3E%7B%3DMATCH(TRUE%2CCumulative%26gt%3B%3D12%2C0)%7D%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPlease%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E
Regular Contributor

Hello Everyone,

I am just wondering how to use dcount() function or any function that could result to find the count of the year as shown below in the picture.

Screenshot (1846).png

 

Please help...???

9 Replies

@Zan_Hanifee 

Considering the data in column A, you have list of years are unique ,,, so if you want to count the year, you get 1 for each.

But I don't this is the issue,, if you want to count that how many years are involved to get 36000 then you need an array formula or Solver can do this also. 

 

So better edit your post & clear the issue,,, or share the expected output with us.

@Zan_Hanifee If the set-up is really as simple as you describe, and if you are willing to insert a helper column with a cumulative amount per year, XLOOKUP or MATCH could do this. See attached.Screenshot 2021-02-22 at 07.12.23.png

@Riny_van_Eekelen 

Thank you for giving the solution

Can you please explain this formula - 

{=MATCH(TRUE,Cumulative>=12,0)}

 

Please?

@Zan_Hanifee 

From the inside out, "Cumulative>=F12" creates an array of <<FALSE, FASLE, TRUE, TRUE ....etc>> for every cell in the named range Cumulative. MATCH is finding the position of the first instance of TRUE in that array. 

{=MATCH(TRUE,Cumulative>=F12,0)}

 So, in this particular example, it finds that the third element in the array is greater than or equal to 36000. Hence, during the third year, the indicated amount has been reached or exceeded.

 

The curly brackets around the formula indicate that you are an older version of Excel. You can't type them when you write the formula, but you need to finish the formula by pressing Ctrl-Shift-Enter simultaneously. Then, the curly brackets will appear. On newer Excel versions this is not necessary anymore.

@Zan_Hanifee 

Thank you for giving the solution

Can you please explain this formula - 

{=MATCH(TRUE,Cumulative>=12,0)}

 

Please?

@Riny_van_Eekelen 

You are awesome. Thank you so much sir

@Riny_van_Eekelen 

For pre-DA Excel

=LOOKUP(F12,Cumulative,Years)

shall work without CSE

@Sergei Baklan True, but not in case the yearly amounts are not evenly distributed.

@Riny_van_Eekelen , yes, it works from left to right. When to avoid CSE

=MATCH(1,INDEX(--(Cumulative>=F12),0),0)