2 min readfrom Microsoft Excel | Help & Support with your Formula, Macro, and VBA problems | A Reddit Community

Trying to remove a criteria from my dynamic array and it's not working the way I think it should.

Our take

Are you struggling to modify your dynamic array formula to eliminate unwanted criteria? You're not alone. Many users find themselves wrestling with formulas that seem to work perfectly until a minor adjustment creates unexpected results. In your case, it sounds like you're aiming to display yearly statistics without the frustrating row of zeros that appeared after your adjustments. Let’s explore how to refine your formula effectively, ensuring it meets your needs while maintaining clarity and precision in your data presentation.

I have a dynamic array formula that I've been using to get certain statistics that I wanted based on the month.

=DROP(GROUPBY(Fanfiction[[#All],[New/ReRead]],Fanfiction[[#All],[Words]],HSTACK(COUNT,SUM),0,1,,(Fanfiction[[#All],[Month]]="January")),1)

https://preview.redd.it/49h2hdjqt5lg1.png?width=273&format=png&auto=webp&s=f8d89d73e6008190aa265735da308f1c00d76616

It's done exactly what I needed and displayed the way I wanted. As seen in the first image. However I wanted to adjust it to show the same statistics for the entire year and not just a single month. So I adjusted the formula to the following.

=DROP(GROUPBY(Fanfiction[[#All],[New/ReRead]],Fanfiction[[#All],[Words]],HSTACK(COUNT,SUM),1,1,),1)

Overall it works but now I've got this row of zeros between the main results and the Total row (second image) that didn't show up in the original iteration of the formula. I considered nesting a second DROP or using TAKE and simply adding a Total row but realized that would only work if the number of rows in the array never changed. Which they will.

https://preview.redd.it/z7ncvu0tt5lg1.png?width=291&format=png&auto=webp&s=443dd541229d9c18732b1e6fb510dda49ab93135

I could replace it with pivot tables, and I have for the moment, but I feel like the formula should do what I want and I just can't figure out why it's not. Any help would be greatly appreciated because I've been banging my head on my desk for two days for what is probably a very simple fix.

submitted by /u/Klutzy-Ad9235
[link] [comments]

Read on the original site

Open the publisher's page for the full experience

View original article

Related Articles