#vba

  1. O

    Copy from one worksheet to another with paste value

    Good morning all, I currently have the following code written below that is a macro that will transfer data from my Capture worksheet to my Log worksheet under the next empty cell row however, I cannot seem to find a way to insert a VBA so the data copied from my Capture worksheet and pasted...
  2. A

    Attachments Embedded in the email Body

    Below is the desired output: Start of the email text Part 1 Text Attachment1 & Attachment2 Part 2 Text Attachment1 & Attachment2 End of email text However, my code seems to add the attachment files only after the Part2 Text. Could anyone please help me with the code? Sub Prepare_Drafts()...
  3. H

    Add multiple attachments within Outlook Body

    I am working on a file wherein I have to add multiple attachments within the Outlook mail body using the RICH TEXT function. Below is the desired output: Start of the email text Part 1 Text FILE 1 & FILE2 Part 2 Text FILE 1 & FILE2 End of email text However, my code seems to add the...
  4. O

    VBA Code Timestamp & Username Copy & Paste Method

    Good day all, I have the following VBA code below to help show when a change was made in one of the columns in my Excel spreadsheet as well as the username however, I am finding difficulties when I am testing my VBA code. I can only retrieve the username/time stamp if I double click on each...
  5. E

    Checking if cells are empty on "Change" event in Excel vba

    I have a macro enabled excel sheet - Sheet_Change.xlsm My goal is to check if a columns A and C only - are empty or not within a table. If cells are empty, then a message should appear and user shouldn't be able to enter a new record (row). It is currently works on any "Change" event. But I...
  6. Z

    Search for a value in a column, then modify all the cells contain this value by adding a number to the end

    I am fairly new to VBA. I need to create a macro that searches the entire column K for keywords " C Box", for any cell in this column that contains these keywords, I need to add a numerical value to the end of the text (this numerical is always in the same row as the cell that contains the...
  7. C

    Select Case using AND

    Hi Guys, Not sure why I can't use the and in my Case. I get a run-time error 13. Any help is greatly appreciated. Thanks ConfigType = LCase(Config_Cells.Offset(0, Partner - 5)) ConfigValues = Config_Cells.Offset(0, Partner - 4) Select Case...
  8. H

    SaveAs Range in Outlook Template

    I am getting an error when I run the below code. Not sure what is creating the issue. Can anyone help me with the code? Sub Mail_Selection_Range_Outlook_Body() Dim rng As Range Dim OutApp As Object Dim OutMail As Object Set rng = Nothing ' Only send the visible cells in the selection. Set...
  9. G

    Call double click automatically in a form

    Hi everyone, Hope you good guys. Since 1 week, I try everything in my possible and nothing works... The goal ? => I have a form that lists differents values in my cells. In this list, I have a search bar and I have to double click on a item to have what I want after. When I double click, another...
  10. L

    Find, select & delete all cells with specific value.

    Hi everyone, I've search through the available articles and can't find exactly what I'm looking for. I've also tried to record a macro and edit the output but nothing is working. I'm trying to write a macro that has multiple functions. The issue I'm facing is that my data set is basically an...
  11. M

    Count value when the value is a merged cell

    Hello, I'm a newbie to type VBA code. Recently, I would like to create a series of VBA code in order to accelerate work. Now, I have faced the problems below: 1. I would like to count the number of "LTG" which has 3 merged rows only.(shown in the uploaded image) 2. About the Find Function, I...
  12. N

    How to get the latest emails and append to the existing file instead of looping through all items using VBA?

    I have a code that loops through all the outlook emails under a subfolder and extract the body of the email based on the subject. How do I modify the code to only append the data extracted from emails in the existing file instead of looping through all the emails and overwriting again & again...
  13. N

    Invalid Next control variable in macro

    Hi. I keep getting an error as Invalid Next control variable reference for my below code. Any help would be greatly appreciated. Option Explicit Sub ImportTable() Cells.Clear Dim OLApp As Outlook.Application Set OLApp = New Outlook.Application Dim ONS As Outlook.Namespace Set ONS =...
  14. N

    VBA to extract data from outlook mails

    I have a VBA code that extracts table data from outlook emails but from a particular subfolder. I want to generalize my code and instead of searching in a particular subfolder under "Inbox", I want the code to filter the emails directly from the "Inbox" folder and then extract the tables from...
  15. albytross

    find partial matches in header of all worksheets and replace with set values

    Hi, My background is CSS and HTML (yes, i'm a fossil). Can anyone help with some code? I'm impressed how much i've managed to get done using various forums but now I am well and trully stuck. I have a workbook open with numerous worksheets (the total number of worksheets changes, depending on...
  16. U

    Worksheet_Change - Argument not optional

    Hi, I have been trying to update the color of corresponding tabs when the table column containing the status is changed. I have written the following code to achieve the same: Private Sub Worksheet_Change(ByVal Target As Range) On Error Resume Next If Not Intersect(Target, Range("D:D"))...
  17. Q

    Compare two columns and add missing string + value to two different columns vba

    Hey you! I was trying to tweak the code provided by mumps in this thread: Find missing values between two columns with VBA With 0 success and I'm super desperate, however, I need to have this solved today in order to go to bed peacefully. The workbook is used to have an overview of Product...
  18. H

    Delete row from 2 sheets in one go if match found

    Hi, I am trying to delete the entire row from 2 sheets in one go if it finds a match from another sheet. The below code shows an error and highlights UNION. Got no idea how to fix this. Sub custom_Remove_Entities_NewTemp() Dim Cl As Range, Rng As Range Dim v1, v2, v3(), i, j, k, r, c, nr...
  19. H

    Delete row if match found

    I want to delete rows if the code finds a match from the list in another sheet. The below code does not delete all the rows where the match is found in one go. Sub Delete_Newlyadded() Dim Cl As Range Dim Dic As Object Set Dic = CreateObject("scripting.dictionary") With...
  20. H

    Replace range if match found

    The code finds a match for the each cells in Sheet2_Column_1 from Sheet1_Column_1....If a match is found then replace the range in Sheet2_Columns_1 to 5 with Sheet1_Columns_7 to 11. The blow code only replaces the cell data in Sheet2_Column_1 with Sheet1_Column_7 when the match is found. Is...

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