1. H

    Variable workbook declaration

    Hello I have a workbook that contains data and a VBA to do some tidying up and formatting. I need to be able to open up 2 other workbooks to do a vlookup on, the problem I have is the 2 workbooks change name everyday. How do I declare these other 2 in my main workbook. Any suggestions would be...
  2. P

    Prevent Popup Window when Opening Azure RMS Protected Files

    Hi all, I'm currently working on a project to run through a list of files on a network drive and report the SQL connections and VBA Modules within each file. I am running into an issue where a file is protected using Azure RMS and I do not have access to the file - I am presented with a popup...
  3. Y

    Check for existng appointments in calendar to prevent duplicate entries when importing from excel

    Hey Guys, I'm stuck trying to prevent duplicate appointments being created when i run the following code to import excel dates to outlook. Public Sub CreateOutlookMeetings() Sheets("sheet1").Select On Error GoTo Err_Execute Dim olApp As Outlook.Application Dim olAppt As...
  4. M

    Re-Initialize Conditional Formatting Array Formulas (50+ Rules/Columns)

    Hello all! I have a workbook with multiple tabs (such as "MF1 - Employee Data") that acts as a template for clients to place their employee data into. Also in this workbook is another tab (Validation Data) that contains all of the configuration/build details of the client's environment. The...
  5. S

    Worksheet Change VBA for just 1 sheet

    Hi, below I have VBA for worksheet change. But I want it only to run on 1 sheet, not across all sheets. What do I need to change to make it run for a specific sheet name. Private Sub Worksheet_Calculate() Static oldval If Range("F3").Value <> oldval Then oldval = Range("F3").Value '...
  6. M

    Make a word document from range of cell and send as attachment from outlook

    I have this code to send PDF files but now I need to send word document instead of PDF, could someone help to adjust the code: Sub PDFXX() Dim SaveAsStr As String 'SaveAsStr = ActiveWorkbook.Path & "\" & ActiveSheet.Range("J1").Value SaveAsStr = ActiveSheet.Range("J1").Value...
  7. W

    Multiple OptionButtons - Cell updated with selection

    Good morning all. I hope that I'm putting this in the correct place, I've looked and some of the answers I've found answer part of the issue but not all. I have a userform. When the user double-clicks the "Vendor" cell in the workbook, it pulls a userform with 28 vendors attached to option...
  8. S

    Temporarily unlock VBAProject password to run code

    Hi Experts, I have a number of workbooks (20+) that are being used by multiple users, and the code is password protected in order to hide sensitive information. Currently, I'm working on implementing a UserForm, that will be the same for all workbooks. The form is be imported on open, and that...
  9. RoseChompooh

    Insert Column in loop for another sheet

    Hi Guys, I want to insert the column (in loop) for another sheet. The example below is the code for inserting column in the current sheet only. However, does anyone know how can I insert the column in Sheet 2 from the code below please ? Example: Sub VBAColumn4() Dim Column As Integer...
  10. A

    Copy Cells in a loop from text file

    Hello everyone! I am new in VBA and I have problems with importing text and copying it in current worksheet. I created a code that imports text file to last worksheet in current workbook, but an error "Type mismatch" appears when I try to copy it in worksheet 1. Actually, I need to copy every...
  11. M

    Update Source Data for Pivot Table

    Hi all! I have a workbook that contains a pivot table, a data set, and several user input pages. I have a macro that updates this data set, and the size of the set may change between each update based on user inputs elsewhere in the workbook. I would like the Pivot Table to update as well...
  12. D

    Copying Data over from one workbook to another issue

    I have two workbooks for my code, one is a database (The "Changes" sheet in my example) and the other is an input sheet "(Codename "Sheet1" as my code is being written inside this workbook where Sheet1 is). I am trying to have the code check if the value of certain cells in column "K' of Sheet 1...
  13. V

    Remove Column if Blank

    Hi and thanks, pls check the following sheet, want to remove all the blank column Excel 2010 32 bit BCDEFGHIJKLMNO 1NameAttend 1Attend 2Attend 3Attend 4Attend 5Attend 6Attend 7Attend 8Attend 9Attend 10Attend 11Attend 12Attend 13 2JohnPPP 3PPP 4PPP 5 6RaghuPP 7PP 8PP 9 10MattyPPP...
  14. S

    Trying to get Max value from column in Table and get 0.. (VBA)

    Sub Macro1() ' Sheets("issue raw data").Select Range("Table1[[#Headers],[Amount of matches]]").Select highest = WorksheetFunction.Max(Selection) answer = MsgBox(highest) End Sub So I have numbers like 1,2,3,4,5 in column, but for some reason it results in 0. I tried to add Dim...
  15. X

    Sumifs within an Array?

    Is it possible to do a sumifs within an array? I have a large data set (circa 20,000 rows) that I am working on and one of the elements is a sumifs. Currently I'm creating most of the array, pasting it to a sheet, and then updating the remainder of the array by running the sumifs on the sheet...
  16. D

    Excel vba: nested IF's? or combined IF?

    Hi, a quick question on principle. What is the better option in Excel VBA when it comes to testing a whole column for some conditions. Nesting the If functions in a logic way? Narrowing down to cells that matter If Cell <> "" If Cell<> "TestText" If Len(Cell) > 5 '...
  17. R

    Creating a single email from list

    Hey y’all, I am having issues finding a VBA that can create an email in outlook from a list of email addresses. The email addresses change fairly constantly and will sometimes have blank cells in between them. I would like it to create a single email but can only find VBAs that create...
  18. S

    [SOLUTION HELP]: Copy data from cell and pivot table into new table format.

    Hello, I need your help on EXCEL VBA solutions as per below requirements 1. Copy pivot table data in cell A9:A11 and C9:C11 in to sheet OUTPUT per example in sheet output. 2. Copy data from sheet INPUT cell G32,G36,G37,K32 (cut only first 2 digits),K33,K34,K35 (cut only first 3...
  19. 5

    VBA code to set print preferences

    Hi, I need a VBA code to set the print preferences for all the worksheets in my workbook (in Personal) to narrow margins, landscape and A3.......hopefully with one sub to do all the sheets at once. Cheers.
  20. C

    Copying a dynamic range of cells

    Hi I've currently got a data sheet similar to the one below. The data sheet gains multiple rows each month as each new reporting month is added. The column positioning also changes each month. However the title for each range is the same each month. I want to be able to use VBA to search for...

Some videos you may like

This Week's Hot Topics