vba

  1. K

    help with vba and multiple filters

    Hi, I have some values in column A which just contain an 'x'. Then I have some values in column C that just contain a 'y'. I want to have some vba code that will filter all rows that have an 'x' in A OR a 'y' in C. Is it possible? James
  2. D

    VBA Conditional Statement That Functions Based on Today's Date

    Hey everyone! I am currently trying to implement a function into a workbook that has many worksheets. Each worksheet has individual dates stored in cells E1:R1. When the workbook is opened I want the code to immediately run (so I put it in the Workbook_Open sub). The code looks through each...
  3. B

    Runtime error trying to create a bulleted list in Word using Excel VBA

    Hi all, I am trying to create a word document with inputs from Excel. Everything has been working well until I tried to create a bulleted list. The relevant portion of my code is posted below: Set wdApp = New Word.Application With wdApp .Visible = True .Activate...
  4. A

    VBA Class Module: Should it be a property?

    I'm trying to learn object classes in VBA and having a hard time trying to apply the knowledge; looking for a spot check. This is working as I intended, but I don't think I'm doing the property "CrossesFY" the right way. Here's the clsCEDOrder class: Option Explicit 'CLASS MODULE - clsCEDOrder...
  5. Chris_010101

    Mail Merge Macro - Saves to PDF/Word

    Hello I use a macro to save mail merged documents into word and PDF files; very handy. I must select all the rows above the row I need in the recipient list for it to work. If I only ticked "Sam" and left "Connor" and "Vincent" unticked, the macro will produce a "runtime error 5631" on...
  6. M

    Convert Date Problem

    Hello, I'm facing the following problem: I insert in 2 cells: month (in text) and year (in number) (example. "October" and "2024"). I want to create a function that convert this information in the following format "dd/mm/yyyy" and print it into a specific cell. I tried myself for a lot of time...
  7. U

    Can the VBA LIKE or any similar function return the actual string found using wildcards instead of the T/F bool?

    I am trying to search for a string in text using wildcard and returning the actual text found or the start and ending position of string in text. Since the INSTR function does not use wildcards, can the VBA LIKE or any similar function return the actual string found or location in text using...
  8. K

    VBA codes to replace all cells containing a certain value

    Hello VBA experts, I have a workbook with tons of formula similar to below but with different column and row number. e.g. '=SUM('2022!W6, 2021!W6, 2020!W6, 2019!W6, 2018!W6)' '=SUM('2022!Z6, 2021!Z6, 2020!Z6, 2019!Z6, 2018!Z6)' And every year, when there is new data e.g. 2023, i have to add...
  9. Cubist

    VBA - Application.Speech.Speak TroubleShoot

    I'm testing out the Application.Speech.Speak.This is new for me. However, when I ran the code, the application said that it was [running] but I didn't hear anything. When I pause the code, I get the "Application-defined or object-defined error". Do I need to set up something first? This is the...
  10. M

    Trim/Clean Rows faster in VBA

    Hello - I have the following code, but it takes a long time to run. Can someone help me shorten it/make it run faster? Thank You! Dim ws As Worksheet Dim lastRow As Long Dim i As Long ' Specify the worksheet Set ws = ThisWorkbook.Sheets("IMPORT_RATES")...
  11. D

    Create Vertical Scrolling Text in UserForm

    Trying to create a userform in VBA excel where in the text can be scrolled vertically to show what I add in specific cells of excel. I am using version 2016 of excel. Have taken VBA code from google which is given below: Private Sub UserForm_Initialize() Me.Label1.Caption =...
  12. S

    Conditional Formatting changes from XLSM to XLSX when I use VBA code to save a new file

    I have the below code that takes two worksheets in an xlsm workbook and it saves them as an xlsx workbook. The problem is that when the two sheets are saved into an new xlsx workbook the conditional formatting colors change. Is there a way to keep the formatting from XLSM to XLSX? Sub...
  13. A

    VBA code to copy various ranges of data multiple times

    Hello- I need help creating vba code that will move, transpose, and stack data from D2:F5 and B9:F12 into B19:H26 based on number of rows and columns in A1:B2. Any help or suggestions would be appreciated.
  14. T

    Create and auto-populate comments

    Good afternoon, Is it possible to create and auto-populate comments in Excel? If for example I have two sheets and sheet 2 is pulling values from sheet 1 that meet certain criteria, can I automatically create a comment for any values pulled over and then populate it with values from sheet 1...
  15. E

    Auto open vba select column

    I have this vba to auto open and find today's date from column A and select the cell next to it in column B Private Sub Workbook_Open() Dim myDate As Variant, rng As Range Set rng = Range("A1:A68") Set myDate = rng.Find(What:=Int(Date), LookIn:=xlFormulas) Cells(myDate.Row, myDate.Column +...
  16. G

    Balance Sheet Generate Table via VBA/Macros

    Dear Guys, I am just start learning VBA from the beginner and really frustrating on convert excel formulas to VBA. I would like to Generate a "Consolidated Balance Sheet" table (right side) from the raw Balance Sheet data on the left via VBA. Is it possible to do that? I also attached the...
  17. 8

    VBA Macro Error 76; File Path not found

    Hi all, I am new to macros and have been trying to maintain our department's macros that were built by someone who is no longer with the company. The macros are used to pull store data such as address, city, general ledger information and other data. I tried to make some changes to add some...
  18. V

    Copy each sheet to new workbook, paste values and save to specific folder

    Hi all I've been looking for threads that could help but haven't found any that I've been able to use. My problem is that I have a workbook with multiple sheets, each sheet has formulas to get info from 2 other sheets in the workbook. I need to copy each sheet (except for the two with the info)...
  19. M

    Sorting part numbers based on ascending order and also putting "a" part numbers at top

    Hello everyone, I have a lit of parts with part numbers in row b. Some numbers are only numeric and some part numbers start with "a-" (ex. 23443555, 3465787 ,A-10123 ,A-202454, etc.). I need to sort them by ascending order but have the parts starting with "a" on the top of the list. I can get...
  20. SanjayGMusafir

    Evaluate function in VBA

    Hi Experts Got stuck up at a place I'm using following function in VBA to get amounts in last 2 hours x9 = Evaluate("SUMIFS(Visits[Fees],Visits[VDt],TODAY(),Visits[VTm],">="&NOW()-TODAY()-(2/24))") The challenge is when VBA runs, it automatically adds space(s) before and after ">=" as " >= "...

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