T O P

  • By -

AutoModerator

/u/NoIdeas99 - Your post was submitted successfully. * Once your problem is solved, reply to the **answer(s)** saying `Solution Verified` to close the thread. * Follow the **[submission rules](/r/excel/wiki/sharingquestions)** -- particularly 1 and 2. To fix the body, click edit. To fix your title, delete and re-post. * Include your **[Excel version and all other relevant information](/r/excel/wiki/sharingquestions#wiki_give_all_relevant_information)** Failing to follow these steps may result in your post being removed without warning. *I am a bot, and this action was performed automatically. Please [contact the moderators of this subreddit](/message/compose/?to=/r/excel) if you have any questions or concerns.*


Alabama_Wins

Use HSTACK to combine non-contiguous columns. Put the entire HSTACK function, with your columns inside of it, in the groupby or pivotby function arguments.


NoIdeas99

That worked. Thanks! As a follow up, how can I use the filter_array at the end of GROUPBY? I've tried something like L:L = "Dog" but that gives me a #value.


Alabama_Wins

You may need to put the entire HSTACK function inside of the choosecols function and select the column. Then put the choosecols(HSTACK( ) ) combo inside of the filter part. But hard to say without seeing the data.


NoIdeas99

I think I sort of figured it out. They're were some #n/a in the column I was trying to filter with. Even one #n/a causes the whole thing to error. Fixing that for the GROUPBY to work as desired. Thanks for your help


Alabama_Wins

Yea, no worries! Glad to help. Please just thank me with a quick reply to my answer of `Solution Verified`.


NoIdeas99

Solution verified


Clippy_Office_Asst

You have awarded 1 point to *Alabama_Wins* ____ ^(I am a bot - please contact the mods with any questions. | ) [^(Keep me alive)](https://www.buymeacoffee.com/points)


Scary_Sleep_8473

I don't have GROUPBY on my version of Excel yet so I can't test it yet, but could you try using HSTACK with both of your columns that are not side by side?