Why does my cell value stack up as it loops through new workbooks
I'm new to VBA. I've been using for loop to add counts to my summary page, but as it loops through the multiple workbooks, the summary page keeps increasing as it adds up the value of the previous...
View ArticleHow do I make my macro run when 'save' is selected?
I am setting up a document to remove rows if a specific cell contains a value. I want this code to run when the 'save' button is selected. What do I need to add to my vba script to make this happen?I...
View ArticleRuntime Error 1004 / Error 438 when getting the Text property of a copied...
I've inserted a large number of form controll buttons (with the text "") into an excel worksheet by copy'n'pasting (from another workbook). These buttons are connected to this macro (which is located...
View ArticleHow do I use WorksheetFunction.Text to convert a date from M/D/YY to YYYY-MM-DD?
I have a date in cell B7 in my worksheet that is formated as 9/1/2019, I want to convert it to a text string in the format YYYY-MM-DD or 2019-09-01. I tried using WorksheetFunction.Text and searched...
View ArticlePivot Table (Data Model) cannot calculate formula
I have 2 tables that would want to be joint as pivot. I have put in data model and both of the table are in the pivot table. But when I want to calculate fields in...
View ArticleExcel Dropdown to Filter Pivot Tables on Separate Sheet
I've created a drop down using Form Control Combo Box for the user to select/filter the data without having to go to the pivot table itself. How can I connect the Form Control Combo Box through VBA to...
View ArticleHow do I copy a cell formula by reference (or evaluate a cell formula)?
Data: a set of cells B2:B9 with numbers.Result: kept in C2:C9, where I apply some formula to the relative cell on the left (e.g. C2 depends on B2, C3 depends on B3, etc.).The formula can be, for...
View ArticleExporting to excel with proper cell formatting on ag-grid
When I export a table to excel using ag-grid's own exportDataAsExcel() the resulting excel contains dates as General data type instead of Date. []I have used this:exportDataAsExcel({...
View ArticleVBA Inputbox to Prevent Decimals
I am trying to develop a tool that will help standardize a description catalog of products. I want to have an input box prompt a user to enter a size. I want to encourage size entries like "5-1/2" and...
View ArticleExcel Sumif formula
I am trying to create a SumIf formula that adds multiple columns together based on one criteria.=sumif(F$8:F$58,F73,L$8:L$58+I$8:I$58)This is giving me an error and will not add the two columns together.
View ArticleVBA Excel Error 424 search textbox to display listbox, error display listbox...
I am trying to create a userform to search for a person in a 10000 entry excel, using any of the NO, Firstname, lastname, username or email column.I can search. However, when the listbox displays the...
View ArticleVBA Selection Box [closed]
Is there a way that, upon running a macro, a selection box comes up with predefined terms and you can select which one you want to run through the macro?For example, a selection box with the number 1...
View ArticleAutosearching CAGE codes
I need to retrieve the attributes for roughly 500 CAGE codes from the DLA and record them in my spreadsheet. I'm starting by trying to retrieve it for one item, then eventually looping it. I keep on...
View ArticleSplit Cell On Criteria
I have a complicated split I need to do in VBA excel. I want to split each piece that starts "C:", includes "OCAK" and ends ".JPG" in range("C1") into A1,A2,A3... when click the button.FROM THIS TO...
View ArticleHow to fix "Run-time error '380': Could not set the RowSource property."
I have used the exact same code below for different sheets and it works correctly, but when I edited it for a new set of sheets in the same workbook the Run Time error comes up.Private Sub...
View ArticleExcel VBA copy textbox to clipboard
I am currently trying to use a command button to copy text from a Text Box to the clipboard. This is my full code:Private Sub CommandButton1_Click() With New MSForms.DataObject .SetText TextBox1.Text...
View ArticleNeed code to duplicate worksheet in addition to adding and retitling
I'm trying to set up a spreadsheet that duplicates the previous worksheet into a new tab daily. I have it set up to create a new worksheet and rename it daily, but I can't figure out how to add the...
View Article(VBA) For Loop That Clears Cells of Variable Range
I am trying to create a Subroutine that clears out cell contents if the cells meet certain parameters. I thought this would be fairly straightforward but it seems like it's more complicated than I...
View ArticleHow to use a sumifs and an if statement in the same line of code?
The question might be a bit confusing but let me show you some code to make sense of...
View Articledynamic conditional formatting based on dropdown
I have 7 Columns, 5 with data and the first two with names. Is there a formula I can use in conditional formatting where if I change my column from the drop-down, conditional formatting will look in...
View Article