(Solved) – Excel range selection using VBA


I’m trying to create a macro to assign to a button that will copy multiple cells from a power query table based on if another cell in that row has a specific value. I need to copy those cells in groups of 100 or less to paste into another program.

If Column A = X add cell in Column B to selection up to a count of 100 then copy that selection
Then I paste that selection into a different program
Then back to excel starting at 101 and continue up to 200, etc.

I’m thinking each group of 100 could be selected with a different button to make things easier. I anticipate I would need maybe 5 buttons in that case.

I have sorted the table to group them together to make range selection possible but I’m still unsure how to go about this.

Any help would be appreciated and let me know if any clarifications would help.

Leave a Reply

Your email address will not be published. Required fields are marked *