i.value

  1. A

    Setting data range and speeding up VBA code

    Hi, I have some simple VBA code which does not work the way I want. It's probably something simple. First, in the code LastRow = Cells(Rows.Count, "B").End(xlUp).Row I would like to start the row count at row B3 not row B1; tried several options but all returned errors. Sub Test2() Dim...
  2. D

    modify data based on range

    i want a macro that loops from column K in sheet I'll call "ABC" and checks the values against a data range called "filter" (which is in another sheet called "filter criteria") if it finds a row in column K that's also found in the data range "filter" (eg the number 005), then it'll zero out...
  3. L

    code works fine, but is there a faster method?

    I wrote this code for a project. It filters two tabs then appends one set of values to the bottom of the other and then saves the result to a new file. It works fine, but sometimes with 100 or more values for "i" it can take a while. Any suggestions or different code to make it run faster...
  4. O

    .attachment.add - 440 - Property is read-only

    Hi all, I have created the below macro to help with sending emails to multiple clients in a table. 'm getting error 440 - property is read-only. I'm looking to attach a pdf file that is stored in the location shown below. I have verified the path works as the same path has been used on another...
  5. J

    Looping through Data

    Hi: I have data in col A and B. I'd like to build a macro that, if it finds the term "trigger" in col A, it copies the data in col B to col C (all in the same row). But, if it doesn't find the term "trigger" in col A, it copies the prior successful data to col C. Here's what I have so far ...
  6. N

    How to do End(xlUp).Row + 1 using a loop in VBA

    HI. So I am using a loop to move data from one sheet to another but there are 3 sheets in all. I need it to look up each sheet before it moves data over to only paste in a blank cell. Currently my macro is as follows Rc = 2 For p = 1 To 3 For i = 5 To 3000 With Sheets("Data")...
  7. S

    VBA EMail distribution not working

    Hello, I've built a program in excel VBA that creates emails and attaches invoices based on a distribution list. The program creates drafts of the email and saves them for review before we manually send them. The issue is that every single e-mail came back undeliverable. This is the e-mail I...
  8. H

    Copy VBA CommandButton to next sheet in Excel

    New to VBA. I have a 2 workbook Excel. Programmed successfully a CommandButton on sheet 2 ("PTID_Link_Log"). Now I want to move it to sheet 1 ("Assignment"). Now it only completes actions on sheet 1, nothing on sheet 2. How do I make the code work from sheet 1? Code:Private Sub...
  9. S

    VBA Save Email as draft

    Hello, I am working on a project to save emails to a specific subfolder in the drafts. Everything works perfectly up to me putting them into a specific folder. The folder would be "Drafts"\BACode I just need help on inserting that into my code [Code] Option Explicit Public Timing As String...
  10. A

    Excel VBA: How to compare values of two cells?

    I am trying to compare the values in two columns for consecutive rows. Specifically, I would like to check the value under Column B and Column C of each row with the one directly above it. And if it matches, perform some XYZ action. I have the code below which I tried to use but it keeps...
  11. H

    Moving send email to ARCHIVE Folder once email sent.

    I had this code which work pretty well from this user here. https://www.mrexcel.com/forum/excel-questions/1103982-vba-send-emails-attachment-base-path-folder-4.html But need someone to help. Possible to move send email to ARCHIVE Folder once email sent on outlook In outlook, there is a SAVE...
  12. H

    VBA to send emails attachment base on path (folder)

    <tbody> A B C D E F S/N To: cc Subject Body Path of Attachment folder 1 abc@email1.com abc@email1.com test email 1 Hello Email C:\Users\ABC\Desktop\SavedFolder\Folder1 </tbody> I had a code below, possible to attach a code which will attach any file tht found in Path of Attachment folder...
  13. M

    Recon / Duplicate VBA Freezing when used on 100-200k or more rows.

    Hi Forum, I have written a piece of code that does reconciliation: The first part checks between columns: Sub AutoRecon() Worksheets("Main_Recon").Select Dim i As Long, _ LRa As Long, _ LRb As Long, _ rowx As Long LRa = Range("A" & Rows.Count).End(xlUp).Row LRb = Range("G" &...
  14. O

    VBA Loop Gives Double Lines of Errors

    Thanks in advance for any suggestions for which feedback will be given. This code runs through a series of tabs and wherever it sees an error, it takes that line and places it in the "Error.Items" sheet. Why is it duplicating each error? I guess I could write code at the end to remove the...
  15. DataBlake

    Speeding up image inserts [vba]

    Sub URLPictureInsert() Dim Pshp As Shape Dim i As Long Dim lastRow As Long Dim urlRng As Range Dim trgtRng As Range lastRow = Range("A" & Rows.Count).End(xlUp).Row For i = 2 To lastRow Set urlRng = Range("B" & i) Set trgtRng = Range("C" & i) If urlRng =...
  16. P

    Emailing Multiple attachments with VBA code

    Hi, I am using VBA code to send multiple clients with copy to some. It looks like below... I want to attach multiple file ....plz suggest. ************************************************** Sub Mail_Send_withattachment() On Error Resume Next Dim employeename, tomailid, ccid, bccid, compname...
  17. O

    Insert image in msg.body

    Hi all, I'm looking to insert an image from file source "D:\users\Owen\Desktop\Test\IMG_123.jpg" into my msg.body. Is there a way this can be done? Sub Send_email() Dim sh As Worksheet Set sh = ThisWorkbook.Sheets("email") Dim Outlook As Object Dim msg As Object Set...
  18. O

    If not working

    Hi all, I am having some difficulty with my if function in the below code. I have highlighted in red the part that doesn't seem to be working. The problem that i'm having is the highlighted piece of script should check the value in "E" for Status "Approved" and the body of my email should read...
  19. W

    Filter Pivot table by each customer and auto email invoices unpaid

    Attached file. after you step into the macros. once it filters invoices unpaid by the first customer, in the pivot. It gives an error I was not able to resolve this. anyone able to help me run this code please. Objective of this macro is automate: filter on pivot for each customer, that...
  20. L

    Run one macro on multiple ranges in a single worksheet

    Hi, and thanks in advance. I have a macro that merges a two-column range in my worksheet. Right now I'm duplicating and editing the macro for multiple ranges of columns, because the macro is appropriate for about 10 ranges in my worksheet, maybe more. Is there a way to add a "For Each...

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