Hi All,
My following code works fine but the array is static. I want to make it dynamic. When I tried doing it, it shows error as subscription out of range. Can you please let me know where I am going wrong?
>>> use code - tags <<<
Option Explicit
Public Sub Button1_Click()
Dim i As Integer...
Hello Excel Experts,
Can you guys help me with the formula to calculate the longest streak of a string in a range? Example file is being attached. Thank you.
Hi Excel Masters,
I am trying to automate a process where I need to check each slicer in a Worksheet and change its setting. Basically I am trying to check box with 'hide items with no data' option in slicer setting. Any help with VBA would be highly appreciated. It needs to be done for all the...
Consider converting your range to Table. Combination of excel table and pivot table in awesome. This way you needn't to worry about your data expansion/contraction.
Thanks Hui,
But I feel the code you have given suits well for normal excel range and not for excel tables. Anyways I got the solution from Narayan. Thanks for taking your time and trying to help me out. You guys are awesome.
Hi All,
Can you please help me with VBA code to remove duplicates for an excel table. I don't wan't to refer table by its name. Currently I am using following code which is not working.
ActiveSheet.ListObjects(1).RemoveDuplicates Columns:=1, Header:=xlYes
Hi All,
Also I was able to bypass loop by modifying it a little bit. My final code looks like:
Sub ExpandCollapse()
Dim PT As PivotTable
Dim PF As PivotField
Dim ShowBool As Boolean
Set PT = Sheets("Pivot").PivotTables(1)
Set PF = PT.PivotFields("Client")
ShowBool =...
Hi Debaser,
I ran into another problem now. Although it is retrieving data but the query needs to be run before importing data to excel. Is it possible to refresh query/run query with VBA code before importing data?
If yes what that code would be?