Forum Discussion
kevintl98
Nov 16, 2021Copper Contributor
Using VBA to auto-populate based off of slicer selection
Hello, I am fairly new to using VBA so I am unsure on how to write code to auto-populate H5 with the respective radius value based off of the tank selection slicer. If anyone could help me out or...
- Nov 16, 2021
kevintl98 You didn't upload your file, so I made something myself. Since you only will select on tank at the time, you can use AGGREGATE (sum) in combination with visible cells only to pick up the value of the selected slicer option.
See attached.
kevintl98
Nov 16, 2021Copper Contributor
Hi Riny, this is exactly what I needed thank you for it! Is there a way to prevent the sum of the table showing up prior to selecting a slicer?
Riny_van_Eekelen
Nov 16, 2021Platinum Contributor
kevintl98 Perhaps not the most elegant solution, but if you use the original formula as a helper cell (hidden below the slicer), you can build another formula in H5. See attached.
- kevintl98Nov 16, 2021Copper ContributorWorks for me, I appreciate it.