Not sure what is wrong

Joined
Apr 16, 2021
Messages
44
Office Version
  1. 365
Platform
  1. Windows
  2. Web
Hi,

I am puzzled by the following question.

This is the WRONG chart I have:

AF2: =(IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($A$1:$A$10000)/ISNUMBER($AC$1:$AD$10000),ROWS(AF$2:AF2))),""))

1629212116886.png



Instead, the AF column should correlate to the hours. Each ID should appear once if the person has only regular time and twice if the person has regular and OT time.

It should look like this:
1629212189476.png


Any idea what is wrong and how to fix it?

Thank you in advance!
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Try it like
Excel Formula:
=IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($A$1:$A$10000)/($AC$1:$AD$10000>0),ROWS(AF$2:AF2))),"")
 
Upvote 0
Try it like
Excel Formula:
=IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($A$1:$A$10000)/($AC$1:$AD$10000>0),ROWS(AF$2:AF2))),"")
Thank you.
I don't believe it's working... For example, 2468 should appear twice in column AF because she has Reg and OT, but even with the change, it only appears once. Any thoughts?
 
Upvote 0
It works for me. Can you post some sample data using the XL2BB add-in
+Fluff 1.xlsm
AACADAEAF
1
2123408.51234
312358.2501235
412362.255.751236
51237021236
61238201237
71239221238
81240201239
9124111239
1012421240
1112431241
12 
Main
Cell Formulas
RangeFormula
AF2:AF12AF2=IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($A$1:$A$10000)/($AC$1:$AD$10000>0),ROWS(AF$2:AF2))),"")
 
Upvote 0
It works for me. Can you post some sample data using the XL2BB add-in
+Fluff 1.xlsm
AACADAEAF
1
2123408.51234
312358.2501235
412362.255.751236
51237021236
61238201237
71239221238
81240201239
9124111239
1012421240
1112431241
12 
Main
Cell Formulas
RangeFormula
AF2:AF12AF2=IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($A$1:$A$10000)/($AC$1:$AD$10000>0),ROWS(AF$2:AF2))),"")
I appreciate your help.

Book1
ABSTUYABACADAFAGAH
1Emp. IDNameLocationRegOTTotal HoursTotal HoursReg HoursOT HoursID CODE TO IMPORTHOURS TO IMPORT
21234Smith, AprilFlorida08.58.58.508.5Emp. IDREG0
35678Slacker, BarryIowa8.2508.258.258.250Emp. IDOT0
42468Sila, CathyArizona2.255.75882.255.751234REG0
53579Solar, DennisMississippi07.757.757.7507.755678REG8.25
62222Slinger, EddyCalifornia7.7507.757.757.7502468REG2.25
73333Sanchez, FatimaNew York7.507.57.57.502468OT5.75
84444Sniper, GregoryOhio07.757.757.7507.753579REG0
95555Starteri, HeatherIdaho08.258.258.2508.252222REG7.75
106666Scuttle, IanNebraska07.757.757.7507.753333REG7.5
114444REG0
125555REG0
136666REG0
Sheet1
Cell Formulas
RangeFormula
AB2:AB10AB2=IF(B2=B1,"",SUMIF(B:B,B2,Y:Y))
AC2:AC10AC2=IF(B2=B1,"",SUMIF(B:B,B2,T:T))
AD2:AD10AD2=IF(B2=B1,"",SUMIF(B:B,B2,U:U))
AF2:AF13AF2=IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($A$1:$A$10000)/($AC$1:$AD$10000>0),ROWS(AF$2:AF2))),"")
AG2:AG13AG2=IF(AF2="","",IF(AF2=AF1,"OT","REG"))
AH2:AH13AH2=IF(AG2="","",SUMIFS(IF(AG2="REG",$AC$2:$AC$9987,$AD$2:$AD$9987),$A$2:$A$9987,AF2,$AB$2:$AB$9987,">0"))
 
Upvote 0
Other than you are pulling in the headers, I don't see a problem with that formula.
What do you think is wrong?
 
Upvote 0
Other than you are pulling in the headers, I don't see a problem with that formula.
What do you think is wrong?
I'm pulling in the headers, but when I change it to $A2, it gets screwed up. Also, my AG and AH columns are no longer operating properly, so I guess I need to adjust those as well?
 
Upvote 0
Changing it to A2 works for me
+Fluff 1.xlsm
ABSTUYABACADAEAF
1Emp. IDNameLocationRegOTTotal HoursTotal HoursReg HoursOT HoursID
21234Smith, AprilFlorida08.58.58.508.51234
35678Slacker, BarryIowa8.2508.258.258.2505678
42468Sila, CathyArizona2.255.75882.255.752468
53579Solar, DennisMississippi07.757.757.7507.752468
62222Slinger, EddyCalifornia7.7507.757.757.7503579
73333Sanchez, FatimaNew York7.507.57.57.502222
84444Sniper, GregoryOhio07.757.757.7507.753333
95555Starteri, HeatherIdaho08.258.258.2508.254444
106666Scuttle, IanNebraska07.757.757.7507.755555
116666
Main
Cell Formulas
RangeFormula
AB2:AB10AB2=IF(B2=B1,"",SUMIF(B:B,B2,Y:Y))
AC2:AC10AC2=IF(B2=B1,"",SUMIF(B:B,B2,T:T))
AD2:AD10AD2=IF(B2=B1,"",SUMIF(B:B,B2,U:U))
AF2:AF11AF2=IFERROR(INDEX(A:A,AGGREGATE(15,6,ROW($A$2:$A$10000)/($AC$2:$AD$10000>0),ROWS(AF$2:AF2))),"")
 
Upvote 0

Forum statistics

Threads
1,214,786
Messages
6,121,553
Members
449,038
Latest member
Guest1337

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