Refresh pivot tables but not external data source
I have a spreadsheet with multiple tables, where the data is pulled from an external data source (SQL database). The connections/tables refresh by changing an option in a drop down box and then...
View ArticleIs an array inside a select case statement possible?
I just want to know if it is possible for me to assign an array and use it as a qualifier inside a case statement?Sub AccountCopy() Dim Criteria1 As Variant Dim Criteria2 As Variant Dim Acct As Variant...
View ArticleSorting excel based on color
Im trying to sort the data based on colour and record that action and repeat it. But my prblm is I need to sort even if the data is not present in rows and columns.can anyone please help me out about...
View ArticleGet rid of multiple html tags in python using SQL query as data source
I have a SQL query being loaded in Python and a column in the data has multiple html tags in each record. Within the tags is description data that I need. How does one remove the html tags and keep the...
View ArticleHow to create Python code to read data from Excel file and create XML files
I need help with creation of Python code to Create XML's using data in an Excel sheet. I am not a Python expert. I tried to create a piece of code below. The code just reads data from Excel but I am...
View Articledisable formatting while copy paste operation in excel
I'm come around with the following code to disable to formatting while cell copy paste operation-Private Sub Worksheet_Change(ByVal Target As Range) With Application .EnableEvents = False myValue =...
View ArticleSequential reading of file names in a folder using excel VBA
I am trying to read nearly 1000 files in a folder using VBA. I wish the code to pick the file name in an incremental order such as Dummy3_1, Dummy3_2, Dummy3_3, etc. But instead, the current code picks...
View ArticleHow do I pass a char list by reference from VBA to an external .NET dll?
I'm trying to use a call in a library which is requesting a char array and I'm not sure how I can provide that through VBA.Every call I'm trying to make is causing excel to crash fantastically with no...
View ArticleHow to rewrite excel formulas in a readable manner?
I have an Excel file with formulas in this...
View ArticleOutputting the number of y's in one column that correspond to a condition in...
I'm struggling to output the number of "y"s that correspond to the last 5 "a"s in a data set of two columns, for example the first column contains cells occupied by either an "a" or "b". The second...
View Articleiterating over each cell in account number column and using that to read a...
I need to perform some data analysis on some excel files (that are saved as account number of respective customesr). I also have a master sheet with all the account numbers in a column. I need python...
View ArticleReverse an array in Excel VBA
I have the following code, which based on the logic it should work.I want it to be (4,3,2,1), but at the end of the loop I get t=(4,3,3,4)Sub try() Dim t As Variant t = Array(1, 2, 3, 4) a = UBound(t)...
View Articlepopulate combobox from an excel sheet based on listbox selection (multiselect...
I have a listbox with 3 values and multi select option enabled. Based on the values selected, I want to populate a combobox by referring to certain ranges in excel sheet. The code below works if only...
View Articlefilterbased ranking in powerpivot table
I hope you might be able to help me. My table (T-Brand) consist of the following columns:Category, Subcategory, Segment, Brand: Benefit, Brand : Benefit, Timeslots, the brands itself and their...
View ArticleHow do I create a normal distribution graph on Excel? [closed]
I have already used the Norm.Dist function, but the results show like this
View ArticleCreate a True Count to select most likely possible column
I am importing data from an excel file and am trying to locate certain information from their relevant columns by using RegEx to locate columns that have the data that I am looking for. However, the...
View Articlecreate multiple dataframes in loop and write to excel
I am running a loop over a function that produces a dataframe, that looks like this: Prd1 Prd2 Prd3 Prd4 Prd5 Prd6 Loc1 0 0 0 0 0 0 Loc2 0 0 0 0 0 0 Loc3 0 30.61 0 0 319.58 430.87 Loc4 0 0 0 0 0 120.73...
View ArticleMatching data from two sources and simple calculations in excel VBA
I have some calculations i need to do on a data-set. The calculations are simple (i.e input 1 x input 2 = output), but they take inputs recorded in two different excel workbooks by different people....
View ArticleHow to stop Excel VBA from renaming variables and parameters in unrelated...
I noticed unbelievable destructive behavior of Excel VBA. It silently and automatically renames variables and function parameters in unrelated modules when I add, say, a new property to class. Observed...
View ArticleHow to generate multiple json in vertical column in Excel VBA?
Using excel macro The first line is the json file name, and the second and subsequent columns are the values. With the first column as the key to the json object, only the values in the second column...
View Article