Category "vba"

Count and list all values

I'm trying to loop through cells of a specific column, find new values in those cells, count how many times a specific value is found and return the values alon

How to change value of iRow depending on object value?

I am looking for the iRow value to be dependent on whether the object value. I have 2 buttons: Private Sub OptionButton1_Click() End Sub and Private Sub Optio

Subtract the date from each cell in a column, skip cells that have string values

I have an Excel sheet of expiration dates. Some rows lack an expiration date so I chose to fill those cells with the string “NO DATA”. I want to loo

Array only fills on first iteration of loop

I have a results table with multiple results for multiple samples, and a sample list array containing each unique sample reference value in the results table. I

Retrieving a zip file from a web site using Excel VBA

I'm trying to download a zip file from a public web site http://serviciosede.mineco.gob.es/indeco/BDSICE/homebdsice.aspx. To download the file this site execute

Merging csv files deletes data

I need to choose and merge multiple csv files. All are in the same structure, however the name of file and sheets change. The separator is ; The code merges the

Listbox search and delete

My datasheet: sheet ("Database") - A1 to L10000 (entries) Headers of each Column in A1 to L1 I tried to search the sheet with a userform. I used a ComboBox beca

How to remove special characters from columns D and F?

I have data in column D and F which might have special characters (, . / + &() etc.). I want to remove the special characters if any and trim clean the colu

Clean trim cells from column A and delete entire row with blank cell in column A

I am trying to trim clean column A then filter the blank cells in column A and delete the entire row based on blank cell present in column A. Column A has a fe

Bulk Move All Mails From An Outlook Folder To Another Folder

Can I move all the mails (that category is blank) from an Outlook folder to another Outlook folder at once like copy and paste not through loop, move bulk mails

Returning file name with Left(file.Name, InStrRev(file.Name, ".") - 1) generates error number 5

I get error number 5 in (ActiveSheet.Cells(Rows.Count, 3).End(xlUp).Offset(1, 0) = Left(file.Name, InStrRev(file.Name, ".") - 1) The purpose of this code is

Copying data from multiple worksheets on a workbook to other workbooks that each have the same name as the current worksheets while they are closed

I'm quite new to VBA. I have a workbook named Fruit. It has multiple worksheets such as Apple, Orange, Grape and so on. In a certain folder, I have workbooks wh

How to run a compare though multiple sheets?

I'm trying to run a compare though multiple sheets. I get Runtime error 9 subscript out of range Sub Comp_TEST() Dim ar As Variant Dim var() Dim i As Long Dim

Checking a string value to return a range from another worksheet then add to .To line in email

I am trying to get email addresses from a worksheet(Sheet1) into the .To line for an outlook email based on the specific string value in the main worksheet. I h

How to use Evaluate for dates?

How do I evaluate dates, as seen as below? According to this list, https://www.techonthenet.com/excel/formulas/index_vba.php, all the functions in the formula

Pass a calculation with VBA from Access to Excel

I´m exporting data to excel with the columns like ID Product Quantity Price Sum Our vendors fill in the Quantity and Price. I want to pass a simple calcul

range1.value = range2.value Very slow VBA

I'am writing simple code like nextCell.Value = dateJour.Value, were dateJour is a date located in a cell in the workbook. When I loop (about 100 times) it takes

Split a cell into multiple rows based on line break and format data elements

The datasets are small (10-25 lines), but I have to run a lot of them and it's getting to be a waste of time. The original data looks like this: The output need

Split a cell into multiple rows based on line break and format data elements

The datasets are small (10-25 lines), but I have to run a lot of them and it's getting to be a waste of time. The original data looks like this: The output need

How to add row and copy formula from a cell and paste into a cell of the new row?

I made a button that adds a new row above another row where the value of the cell in column C is "add row above". I did it like this because there is a formula