vba

  1. ChrisMac1

    Add 3rd criteria to VBA filter

    Hi there, I have a long code that includes the following... ActiveSheet.Range("$A$1:$AG$10000").AutoFilter Field:=15, Criteria1:= _ "=EXAMPLE1", Operator:=xlOr, Criteria2:= _ "=EXAMPLE2" It's a code to add a filter to column O to show all the EXAMPLE1 and EXAMPLE2's in the...
  2. F

    VBA to Refresh Pivot Table and Chart

    Good morning! I have the code below that changes the value on my pivot table on another sheet but it does not refresh the pivot table, therefore my pivot chart doesn't refresh. Any help would be greatly appreciated. Private Sub Worksheet_SelectionChange(ByVal Target As Range) Dim PT As...
  3. V

    Loop with a list and save worksheet separately in a specific path

    Hi, Need help. See code below. Sub Create_PDF() Application.ScreenUpdating = False Dim rs1 As Worksheet, rs2 As Worksheet Set rs1 = Worksheets("Sheet1") Set rs2 = Worksheets("Sheet2") myPath = "C:\Users\ELPADILL\OneDrive - Schenker AG\Desktop\2025 Target Agreement\2024 STIP1 Template &...
  4. D

    How to change position of SmartArt node?

    Hi everyone, now i using Smart Art: Horizontal Organization Chart to draw. And I face on with 1 point difficulty when change position of each node in there. I am looking for a way to move node 1 to the top left corner. Can any expert please help me with this? I would greatly appreciate the...
  5. tlc53

    VBA to Hide Rows if Month

    Hi. I just can't get this VBA code to work. Basically, if the Year End Date is March, then it needs to hide rows 71:86. I can't get the Month = 03 bit to work. Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("Year_End_Date")) Is Nothing Then If...
  6. R

    Toggling a Checkmark

    Good afternoon, I have a simple vba code that allows me to toggle a checkmark in a cell. The problem I have is, it will only post it in cell A1. I want the ability to use it anywhere on the active sheet and in any sheet in the workbook. Will someone help me out? Sub ToggleCheckmark() Dim...
  7. A

    Transformation données excel -Formule VBA

    J'ai un modop que je dois utiliser pour transformer un fichier excel , j'ai besoin d'une formule VBA pour automatiser ou une autre solution car je dois appliquer ça pour plusieurs fichiers . Le modop : ajouter une colonne RANG pour numéroter les lignes créer une colonne D : « MUNA PREST...
  8. J

    VBA to export to pdf in a specified order WITHOUT reordering the tabs in the workbook

    Good morning Community :), I have a problem I was hoping you could help guide me with. Will try to summarize it (i tried to upload an example excel file with what i'm trying to do but the "upload image" function didnt link it - any suggestion on how to get it in here?) Current solution /...
  9. E

    Runtime Error 1004

    I'm getting the Runtime Error 1004 Application Defined or object defined error but not seeing what is causing the error! Dim ExcelFile As Workbook Dim CRrow As Long Dim PRrow As Long Set ExcelFile = ActiveWorkbook ---> I do some code where I open another workbook and copy data across to...
  10. B

    Userform data

    I have a userform, and I am trying to get the data that is typed in the text boxes into certain cells on a new sheet in the same workbook. On Sheet Intro, I click the new entry button and I get a userform titled NewForm. The text box renamed NameBox, gets a users name entered into it. You then...
  11. Y

    Excel altering VBA inserted formula

    Hello brilliant people, I am working on a set of utility macros and this one little thing is nagging me. (Ok, lets be honest, theres a ton of things, but this is the one I need help with) I have VBA adding a table, and then adding a formula referencing an entire column of that table. Set tbl =...
  12. F

    Subscript out of range error when replacing ThisWorkbook.Activate with wb.Activate

    I'm very new to VBA, so this is likely a simple question to answer, but I couldn't find it while googling. I have a Sub that is working fine when I use ThisWorkbook.Activate but refuses to run if I replace it with a direct reference to the workbook, and I can't figure out why. Version info...
  13. C

    Autopopulate print tile/print area by locating 2 reference cell locations within an array

    Question says it all. I cannot figure out how to automatically populate the print area / print tile section by referencing 2 dates. I’m using pay period dates. Start date is in cell A2 and end date is in cell B2. I need a formula to find these exact dates within column A, then return the...
  14. U

    Path Address Error "?" (Imaginary Question mark)

    Hello, Please note I am working a macro to create folders with a specific path address If I leave the path address in Visual Basic backend as below it works, but for some reason when I assigned a cell or range("D28").value Visual basic app detects there is a "?" in the path address as...
  15. mmn1000

    Sum of numbers in a list box

    Hello I have a list box inside a user form and I want to display the total amount in the list box in a text box or label For this I used the following code Private Sub sum_subjects() Dim total_v As Double For i = 0 To ListBox1.ListCount - 1 total_v = total_v + Val(ListBox1.Column(5...
  16. R

    Automating Processes - Filter & Delete Rows

    Hi all, I regularly download CSVs of delegate info for events. However, they include a lot more rows than I need. To get around that I usually convert it to a table as I often need that later, then hide the rows containing "Attending" in "Column1", then delete the remaining rows, then show the...
  17. F

    UDF Function to extract first word in a string

    Hi, I'm having trouble doing the VBA to create my own function. I have the excel formula to do it, but I just want to be able to have it be a function so that I can do something like =FirstWord(A2) The excel formula that does this is: =IF(ISERR(FIND(" ",A2)),A2, LEFT(A2, FIND(" ",A2)-1)) So I...
  18. A

    Excel emailing when task date is x amount of days away

    Hi, I am trying to set up a spreadsheet to monitor our small vehicle fleet. I have a spreadsheet which we record when the Tax, MOT, Service and Fuel Cards are due, I have conditional formatting set up to change the cells format depending on when they are due. I would now like to update /...
  19. N

    VBA - copy from one workbook and paste special values to another workbook

    Hello Mr Excel, Its been a while for me, however, I have recently started a new job that calls on my excel skills again and so here I am, looking for some guidance :) I am trying to create some code that copies a range of cells, if a certain cell is populated with a number I then want to open...
  20. M

    VBA to insert row on certain condition

    Hey everyone, Formulas have taken me so far but now feel like i need VBA to help me out. With the table below I have data in column H and along side there may be data in Column I. I wish to have a new row created if there is data in Column I and then the value inserted into the column H space...

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