vba excel

  1. K

    VBA Reference Unsaved Files

    Hello, This is probably a quick fix but for the life of me I cannot figure it out. I have a project that references an open unsaved file ("Invoice Data.xlsx"). Every day a new file is emailed to us with invoicing information. The macro file imports the relevant data and runs some calculations...
  2. 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...
  3. 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?
  4. 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...
  5. 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...
  6. 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.
  7. 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...
  8. 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...
  9. 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 =...
  10. 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...
  11. 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...
  12. 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".
  13. 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...
  14. 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...
  15. 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)...
  16. 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...
  17. 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...
  18. 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...
  19. 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...
  20. 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...

Some videos you may like

This Week's Hot Topics

  • populate from drop list with multiple tables
    Hi All, i have a drop list that displays data, what i want is when i select one of those from the list to populate text from different tables on...
  • Find list of words from sheet2 in sheet1 before a comma and extract text vba
    Hi Friends, Trying to find the solution on my task. But did not find suitable one to the need. Here is my query and sample file with details...
  • Dynamic Formula entry - VBA code sought
    Hello, really hope one of you experts can help with this - i've spent hours on this and getting no-where. .I have a set of data (more rows than...
  • Listbox Header
    Have a named range called "AccidentsHeader" Within my code I have: [CODE]Private Sub CommandButton1_Click() ListBox1.RowSource =...
  • Complex Heat Map using conditional formatting
    Good day excel world. I have a concern. Below link have a list of countries that carries each country unique data. [URL...
  • Conditional formatting
    Hi good morning, hope you can help me please, I have cells P4:P54 and if this cell is equal to 1 then i want row O to say "Fully Utilised" and to...
Top