vba excel

  1. T

    compare and Extract unique values between 2 columns

    Hello All I am trying to create a macro that will Compare data in two columns (on two sheets (sheet1 Column B, sheet2 Column A) and add any missing unique values from sheet 1 to sheet 2 Sheet1 column B Items#s Item 1 Item 2 Item 1 Item 4 Item 1 Item 2 Item 3 Item 4 Item 5 Item 6 Sheet2...
  2. B

    Specific data from a table added to email Subject through using VBA

    Good morning all, As ever I am stuck and need some help, I have my email function working and I am successfully adding an attachment also, however i have a % of inspections completed located in a table that i need to be part of the email, preferably in the subject?
  3. B

    VBA Add Worksheet to an email?

    Good afternoon all, Is there an easyish way to add a worksheet to an email! This is the code I have already, i want to add a certain worksheet! 'it is set to .Display so the email can be checked before it is sent Sub InspectionEmail(Names As String) Dim OutApp As Object ' holder for outlook...
  4. G

    System Error &H8000FFF (-247418113). Catastrophic failure

    I have now twice had this error, where I email a spreadsheet with macros to another person. It is working when I send it using share via email. When they get it there is a problem. When I go and open the original, I also get the problem. System Error &H8000FFF (-247418113). Catastrophic failure...
  5. V

    Is there any way to change range's values more efficiently than looping?

    I have a range of cells with values inside. The values have pattern such as '123-abc'. Now I need to change the value of selection to just 123. I currently use left function to loop over the selection. But it's very slow because I have 1000 cells.
  6. S

    vba code exact match string

    Below is the beginning of my code, the only issue I'm having is that the below list when deleting should only delete on an exact match. So for example if I have 'carrier name' as a column header and 'carrier name 2' as a column header by the list below only carrier name column should be...
  7. M

    Help with VBA project multiple tasks

    Hi, I’m hoping someone could help me with the tasks below; I know it’s a lot but Any help would be much appreciated. (#1-8 order matters) 1) in column AA SheetA any “0” change to blank cell 2) column AC SheetA some cells say “Fired - xxxx” , I’d like to change anything that doesn’t start with...
  8. V

    Error 4605 - this method or property is not available because the document is locked for editing

    This is to copy a range from Excel and send by email. Application.ScreenUpdating = FalseDim Rng As Range Dim xInspect As Object Dim pageEditor As Object Set myApp = New Outlook.Application Set myMail = myApp.CreateItem(olMailItem) Set sh3 = Sheet2 sh3.Unprotect Set Rng =...
  9. N

    Count the total lines in all files in all subfolders

    i want to use vba to count all the lines in all the files in all the subfolder of a directory and display them in a cell. how do i do that? i found a code working for counting the lines in a single file. but i dont know how to construct the loop to apply this to all the files in all the...
  10. I

    find and replace

    Hello, I have excel file with multiple tabs and I need to find text that contains "med ctr" or "med center" or "med cent" and replace it with "medical center" and this needs to be done on every sheet in the workbook. I found a couple of different codes but none of them works the way I need or I...
  11. U

    How to fix "Compile error" displays, "Variable not defined"

    Question for you. Sheet 1&2 name titles need to be changed with the following titles: Sheet1= PrePaidReport, Sheet2 = NewFormat, after I made the changes inthe VBA Script, Sheet titles change to capital letters, then I get, "Compile error" displays, "Variable not defined".
  12. H

    How to ensure cell content follows defined formatting rules

    Hi guys, Need a bit of help here. I am trying to put in some controls in an Excel sheet to ensure data entered follow a particular formatting style. I am hoping to do this via either data validation or some sort of conditional formatting to show conformance. The content of the cell needs to...
  13. P

    Total Row cell value should not be grater than 4.

    Hi, I am trying to write a code where if Total row cell value is more than 4 so it should given an error msg box and restrict the user to do entry. i am using this code <code style="margin: 0px; padding: 0px; border: 0px; font-style: inherit; font-variant: inherit; font-weight: inherit...
  14. H

    Search 2 criteria in ListBox in UserForm after it is populated

    Dear All Masters, My Code: Private Sub Search_Click() Dim x1, i As Long, ii As Long, iii As Integer x1 = [myCar] Application.ScreenUpdating = False With ListBox1 If TextBox2 = "" Then .RowSource = "myCar" Else .RowSource = "" For i = 1 To UBound(x1, 1)...
  15. F

    VBA connect two columns both ways

    I have an invoice master template and in this invoice, as seen in the attached picture in the link. I have several columns. Column B (Item Description) is data validated with a list and then the other columns contain vlookup formulas to find corresponding information from a product list...
  16. M

    Loop through first cells of selected merged ranges only

    am trying to give the user the option to do simple arithmetic operations on selected cells. The thing is that most cells are merged ranges. I got the following already but the problem with it is that it loops through all cells while I only want it to only affect those cells that are not merged...
  17. A

    Max value in Excel.

    Hi guys, This is the macro that i create to insert a new number. Note that I have more than one sheets in my workboooks. In each sheets, there is a column called line reference. The line reference is defined as for exemple A050 or A001. It goes from A to F. For exemple we have A01 sheets, A02...
  18. A

    Locate duplicates and sum the two columns with different values

    Hi, Need help to add / alter the code. Need to sum the values on column 4 & 5 by locating duplication on column 1. Say for an example: <tbody> Consumables 31222 NY <tbody> 698.2 </tbody> 77.6 Consumables 31222 NY 123.4 445.9 Consumables 31222 NY 554.21 23.5 Spares 31119 NY 33.4...
  19. T

    Error number 48, error loading dll

    I build a tools that copied from ron de bruin win tips and adjust it according to my need. https://www.rondebruin.nl/win/s1/outlook/saveatt.htm But after i changed my pc (before using win 7 and office 2007) and upgrade the os, it doesnt work any more. Now im using win 10 and office 2010...
  20. A

    Evaluate formula using a variable as range

    I am trying to evaluate a formula with this code Sub test() Dim myRange As Range Set myRange = Worksheets("Sheet1").Range("A1:B10") 'answer = Application.WorksheetFunction.Max(myRange) answer = [SUMPRODUCT((LEN(myRange)>0)*1)] MsgBox answer End Sub But I getting an error...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top