Find and Replace keeps crashing

I am using a Find and Replace, simple VBA code as below: Sub MultiFindNReplace() 'Update 20140722 Dim Rng As Range Dim InputRng As Range, ReplaceRng As Range xTitleId = "KutoolsforExcel" Set InputRng = Application.Selection Set InputRng = Applicatio...
more »

2017-12-03 23:12 (1) Answers

Find Rightmost Used Column in Excel with VBA

I am having trouble with something that I think should be quite simple and I can't figure out why it isn't giving me the result I want. I have an Excel worksheet sht_Attributes that is laid out as below: I want to get the last (farthest right) cel...
more »

2017-11-30 16:11 (0) Answers

Copy Paste Cells under certain Conditions

I would like some help with the code I'm currently having issues with. This is what the code is designed to do: Inside the "Data" sheet, the code looks for "[whichever term] - Competency", and when it finds it, the steps are as follows: Highlight...
more »

2017-11-27 18:11 (0) Answers

VBA Excel Macro save as part of cell with date

I have the following VBA code saving workbook1 sheets to a folder where workbook1 file is saved. Example: workbook1 has 31 sheets. The code saves each sheet to a new workbook with the same name as the sheet. (Sheet1, Sheet2, etc). Sub SaveShtsAsBook...
more »

2017-11-21 00:11 (2) Answers

Excel VBA - Find on merged cell

I am not able to using VBA find function on a merged cell. If I unmerge that cell, it finds that cell correctly. Is there any solution to this? Private Sub FindTry() Dim oFind As Range With Sheet2 Set oFind = .Cells.Find("/", , xlVa...
more »

2017-11-09 12:11 (0) Answers

Find & Highlight (exact case?)

I have a find & highlight macro below. My problem is that the find is very picky in what its looking for. For example if the cell is 1,811.15. It will not "find" 1811.15. Another example is if the cell has (377.00). It will not find -377 or insta...
more »

2017-11-02 18:11 (0) Answers

VBA - Find value from range of formulas

I have this line of code that is supposed to find the same value in a range: Set RowN = oldDashboard.Sheets("Dom").Range("F1:F1000").Find(this.Sheets("Domestic").Range("A" & i).Value) It works fine when my range is composed of values but when ...
more »

2017-10-30 10:10 (1) Answers

Disable Excel 2016 "Share" on specific document

Is it possible to disable the Excel 2016 "Share" option on a specific document only? I have previously used CustomUI XML to remove all unwanted ribbons buttons etc. for a specific document that I don't want users to send to others or to save locally....
more »

2017-10-25 14:10 (0) Answers

Combobox with list find function additem vba excel

Im trying to do a Combobox on VBA Excel that add items depending on the return of find function that look's if what i wrote exist in my worksheet and show the liste of all words that start with what i wrote. To be more clear, i want to create a kind...
more »

2017-10-25 12:10 (0) Answers

VBA other Workbook Doesnt close Properly

Hi there My VBA code does not want to close my Raw data File properly. I have a data capture form then , When I hit Submit, Opens another Excel File, Copies all the data into it and is supposed to save and close the workbook. My code is as follows: ...
more »

2017-10-24 15:10 (1) Answers

Forget to save excel macro

I was working on an excel macro and apparently I did not saved with a format that support vba macros. So when I open the file I cannot found the vba code. Is there a way to restore the code I wrote, especially that I pushed the save button in the edi...
more »

2017-10-10 16:10 (2) Answers

Worksheet_Change Macro with moving trigger cells

UPDATED I need to show or hide a worksheet based on the answer to a question in the sheet. If the answer is "Yes", then show the sheet. If "No", then hide it. So that part is easy... Now, this question might exist multiple times on the sheet. If th...
more »

2017-10-04 19:10 (1) Answers

Input Box Filter Macro

I have searched for a solution to the following issue and tried to solve it myself but unfortunately my limited knowledge of macros has led me to a dead end! The following is a code from my current macro that I am trying to setup to make a repetitiv...
more »

2017-10-04 16:10 (1) Answers

Error while converting excelsheet to XML

Hello i want to convert a large excel sheet to xml files in a specific folder. To do this i have read the question ( Convert rows of spreadsheet to separate XML files ). I try to apply it and adjust it a litle so it will fit to the excel format: a...
more »

2017-10-01 13:10 (1) Answers

R saving updated workbook with worsheets

require(XLConnect) wb <- loadWorkbook("excel.xlsx") lst = readWorksheet(wb, sheet = getSheets(wb)) I used the above method to load a workbook with all sheets and to update some cells in these sheets. How can I save it back to my C drive ? My w...
more »

2017-09-28 11:09 (0) Answers

how to execute vba macro outside of excel

I have an excel spreadsheet with a massive amount of VBA and macros that include a button. How do I execute VBA code in Excel (specifically to clicking the button and trigger its onclick event) outside excel from python (for example)? Note: I'm wi...
more »

2017-09-23 01:09 (3) Answers

Array's cumulative sum

I have an integer array of values and want to find a simple way of calculating its cumulative sum (S = Data(1) + Data(2) + ... + Data(x)). I already created this function: Function CumulativeSum(Data() As Integer, k As Integer) As Integer For e...
more »

2017-09-21 14:09 (3) Answers

Excel VBA .Find with 2 Criteria

I am using the following code to populate a listbox "lbMaterialList" based on the value selected in the combobox "cbMaterialTypeSearch" and finding matching values in column B. I would now like to expand the functionality to refine the list returned ...
more »

2017-09-19 00:09 (0) Answers

How to refresh a Loop or update a Loop in VBA

So I have this list that is X rows long. Each has 5 columns: Equipment, Type, Material, Size and Price this is in the Sheet2. I also have a database in sheet1 with the same column filled in. I have written a code in VBA that for each row in Sheet2...
more »

2017-09-18 14:09 (1) Answers

Save Workbook with Macros on specific path

i have create a excel workbook for a project. this workbook contains a lot of macros and should be like a template. After the user open the "template"-Workbook, a macro is calling. this macro should save this current file to a specific path and wit...
more »

2017-09-05 17:09 (0) Answers

highlight cells before specified date in column

I have a column of dates in the format MM/DD/YYYY and want to highlight specific ranges of these dates. For example, the first section of highlighted dates should be everything from the first row all the way up to the current friday. Sometimes that d...
more »

2017-09-05 16:09 (1) Answers

Excel VBA Saveas function corrupting file

When I try to save my file with the ActiveWorkbook.Save function. The file get's corrupted and i cannot use it anymore. I already tried the ActiveWorkbook.SaveCopyAs function, but the result is the same. Below the example. I have added the 2 other f...
more »

2017-09-05 10:09 (1) Answers