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?
Hi Debaser,
The query is working fine within access and I can export data to excel as well but it is somewhat slow. Moreover access is developed/maintained by someone else and I prefer importing access data to excel rather than exporting access to excel.
In the SQL query, he had used all the...
Thanks for all the replies. I was bit busy so couldn't respond. Actually queries are already there but when I try to connect to that query it doesn't fetch any data but gives me few blank rows in an excel table.
This is how I am trying to retrieve data:
From Excel Data=>From Access=>
This is...
Hi All,
Is there a way to get the filtered access data(filtered rows) in excel? As of now I am importing everything and delete the unwanted rows in excel. Since the data is huge, it is very slow.
I am looking for a VBA code which brings filtered data from access to excel.
Thank you very much.
Hi All,
I am attaching two files herewith. One is input(Providers List) and another one is output.
I would like to have one line per provider and see the different payers listed out in each column with the corresponding ID next to them. Kindly see the output file for my requirement.
Thanks...
Hi All,
In the attached file there is a pivot table, wherein I want to toggle between expand entirefields and collapse entire field(pivot field client) with the help of macro. In other words if a user clicks the button, pivot field(client) should expand all and if he/she clicks again it should...
Hi All,
In pivot table sometimes we have to drag fields to arrange them in proper way.One can do this without using mouse.Yes you heard me correct.Just type the field name which you want to bring.It promptly obliges you. For e.g we have column fields as East, North, South & West in range B4:E4...