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

HSTACK where second column is based on values from first column

Hi all,

I am trying to use HSTACK to make a two column array. The column A is very straight forward, just copying a column from another tab. The second column however, is giving me problems. I want it to check other tabs and sum the amount of times the corresponding row in column A appears. I can only seem to do this for the first row before it throws a fit.

What I have right now that's not working:

=HSTACK( 'Sheet1'!$B$2:$B$27, SUM(COUNTIF('Other Sheets'!$B$54:$B$73,'Sheet1'!$B$2:$B$27)) ) 

If I change it to:

=HSTACK( 'Sheet1'!$B$2:$B$27, SUM(COUNTIF('Other Sheets'!$B$54:$B$73,'Sheet1'!$B$2)) ) 

It prints all of Column A correctly, but only Row 1 of Column B as expected, but that tells me the general idea works.

Thanks in advance for any advice!

EDIT: I had summarized some of the other stuff in the formula to not have to explain it all, realized after some misunderstanding that's not a great idea, here's the actual function that's not working:

=LET( x,'Background Data'!$B$2:$B$27, HSTACK(x, SUM(COUNTIF(INDIRECT("'"&IncludedGames&"'!$B$54:$B$73"),x)) ) ) 

I have a Name set up for "IncludedGames" to list all sheets to be checked based on a checkbox list. This works perfectly for everything else on the sheet, including referencing it with INDIRECT that way, so that's not the issue, and if I replace the last "x" in the formula with "'Background Data'!$B$2" it will print the correct value, just can't list it.

submitted by /u/Icy-Feeling8091
[link] [comments]

Want to read more?

Check out the full article on the original site

View original article

Tagged with

#Excel alternatives for data analysis
#generative AI for data analysis
#natural language processing for spreadsheets
#google sheets
#row zero
#no-code spreadsheet solutions
#AI formula generation techniques
#big data management in spreadsheets
#conversational data analysis
#real-time data collaboration
#financial modeling with spreadsheets
#intelligent data visualization
#rows.com
#cloud-based spreadsheet applications
#Excel compatibility
#HSTACK
#column
#COUNTIF
#array
#Sheet1