Help with formula consolidating Data

Newbie73

Board Regular
Joined
Feb 4, 2024
Messages
109
Office Version
  1. 365
Platform
  1. Windows
Hello everyone,

I need some help with a formula that I can't get my head around it. Example sheet provided:

test1.xlsx

Column A has IDs which often will be duplicated. Column B has a number from a test specific to the ID on Column A of that row and then Column C dates for those tests.

So what I would like to do is to consolidate these data as in, all the results for each ID from Column A sorted per year and If more than one result (column B) different than zero from the same year then sum the value.

There's a wanted result on the example sheet which hopefully it will help.

Thank you in advance for your help and please do tell if I didn't explain something correctly or if you need any more informations.
 
You're welcome & thanks for the feedback.
 
Upvote 0

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Took me awhile as I didn't want to bother again, and results wise seems to be okay but could you just double check if you could if I did this right or if there is a more efficient way, I wanted the zero values to show so I editted your formula to this:

Excel Formula:
=LET(f,HSTACK(A2:A10000,B2:B10000,YEAR(C2:C10000),D2:D10000),u,UNIQUE(HSTACK(CHOOSECOLS(f,1,3))),b,BYROW(u,LAMBDA(br,SUM(IF((INDEX(f,,1)=INDEX(br,,1))*(INDEX(f,,3)=INDEX(br,,2)),INDEX(f,,2))))),c,BYROW(u,LAMBDA(br,SUM(IF((INDEX(f,,1)=INDEX(br,,1))*(INDEX(f,,3)=INDEX(br,,2))*((INDEX(f,,4)="ir")+(INDEX(f,,4)="r")),1,0)))),CHOOSECOLS(HSTACK(u,b,c),1,3,4,2))
 
Upvote 0
If it does what you want, then it's correct. :)
 
Upvote 0

Forum statistics

Threads
1,223,886
Messages
6,175,190
Members
452,616
Latest member
intern444

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