Macro Button to Copy Data from One Cell to Another Based on Slicer Selection

carter524

New Member
Joined
Sep 3, 2020
Messages
1
Office Version
  1. 2019
Platform
  1. Windows
I've used Get & Transform to create a connection between my Excel spreadsheet and an internal SharePoint list (technically, survey results).

The data from the List pulls into Excel onto a worksheet I've labeled "SurveyPQ", and I've setup a slicer based on a column labeled "Date" (the responder is required to enter a date when completing the survey).

Currently, I can use the slicer to filter the survey results to only the ones submitted for today, and then copy those results to another tab named "Data", which has a bunch of formulas my colleague has setup that then changes dashboards on two other tabs. I could just take his formulas and point them to my tab where the data is pulled from SharePoint...

But I wanted to know... is there a way to create a macro that can do one of the following things?

- check the DATE column in all rows, and only copy a range of columns (D:AF) from the rows where DATE = TODAY to the "Data" tab, starting the paste at a specific cell on the "Data" tab
- wait for me to select a date with the slicer, and then click a button to copy the remaining rows from the SurveyPQ worksheet to the Data worksheet

I created a macro that selects a range of cells, and I was going to expand on that... but I couldn't figure out how.
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand

Forum statistics

Threads
1,214,649
Messages
6,120,728
Members
448,987
Latest member
marion_davis

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