vba

  1. C

    copy data for meeting condition in multiple times

    I have following data wherein I want copy data between all "sr" and "extra" to separate sheet . I have following vba which copies data from first meeting of find conditions ie., row after sr and one row before extra, which is perfect. But same...
  2. A

    INDEX MATCH USING VBA

    Sub Match() Dim Rng As Range Dim Cll As Range Set Rng = Range("d1", Range("d1").End(xlDown)) For Each Cll In Rng If Cll.Value < "" Then Exit For If Cll.Value > "" Then Cll.Value = _ "=INDEX(range1,MATCH(RC[-1],range2,0),2)" End If Next Cll End Sub range1 and range2 is Name Manger Column D or...
  3. M

    How to get GMT time on MAC with vba.

    Currently using the following on Windows to get GMT/UTC time but I need a way of doing this on MAC as well. Thanks in advance. Function UTC() As Date Dim dt As Object Set dt = CreateObject("WbemScripting.SWbemDateTime") With dt .SetVarDate Now UTC = .GetVarDate(False) End With...
  4. C

    Combine worksheets from multiple workbooks

    Good day experts, I'm attempting to combine one sheet out of multiple workbooks into the sheet where my module is located. The workbooks are located in the same file on the network, but I don't want all of them. The sheet name is the same in each workbook. I found a code that works well at...
  5. derek.hughes

    Ron DeBruin email worksheet code compile error - Help!

    I am in office 2013 (32x). When I run this macro: (https://www.rondebruin.nl/win/s1/outlook/amail1.htm) in Excel 2013 (works in 2016) - I keep getting a compile error at "Environ$". I've searched the web for hours and cannot figure out how to resolve saving the temp file. This is on a network...
  6. O

    [VBA] Send mail with range in body, and unique value in A:A based on reciever

    Hi, I want to send a mail with a range in body. In A:A there is a link to a page. One of the parameters in this link is the recievers mail address. Is this even possible? I usually find a lot of good examples on Excel Automation - Ron de Bruin, but none of them match my needs this time...
  7. T

    Edit Specific Range if Cell Value is True

    Hello, I have the code below: Sub editrange Dim nLastRow, i As Integer Set wbCurrent = ActiveWorkbook Set WS = wbCurrent.Worksheets("Sheet1") nLastRow = WS.Cells.Find("*", LookIn:=xlValues, searchorder:=xlByRows, searchdirection:=xlPrevious).Row For i = nLastRow To 13 Step -1 If...
  8. M

    Linking named ranges to Power Query or using VBA to update a Power Query

    I need to update a Power Query using VBA or be able to define the query so that the code is linked to a named range in the same workbook. I write dynamic SQL scripts (based on user input) in a worksheet, then in a single cell (range name = “sqlQuery”) I use the Textjoin function to compile the...
  9. E

    Need help in selecting drop down menu with VBA

    I am trying to write a code using VBA to extract a specific status using VBA Selenium in Chrome. But i am stuck at one place. I am unable to automate to click on drop down menu. Sorry i cant share the website link as its confidential. However, I have found similar website with similar...
  10. B

    VBA export to CSV error

    Hello all, I have the following code, but when this exports to a separate csv file, it comes up with an error message "File format and extension of xxx don't match. The filecould be corrupted or unsafe." Is there a way to stop this error message coming up, without going in and resaving it as...
  11. K

    VBA to copy template sheet and rename based on items in list on master sheet

    Help? I'm trying to set a macro that will reference a list within a "SiteMaster" worksheet (starting from C6) and create a new copy of a "LibraryTemplate" worksheet for each item in that list, then rename it to match how it is identified in the list. I also should note that the "SiteMaster"...
  12. S

    Excel VBA relection bug

    Hi, I have the weirdest bug. I have a simple macro that goes like this: Sub Update() Application.Calculation = xlManual ActiveWorkbook.RefreshAll Range("A20").Select Application.Calculation = xlAutomatic End Sub When I use this code, all goes well, but I later get a...
  13. M

    Copy sheets (that have tables) whose names are in range VBA

    Hi, I'd like to ask for your help with a vba i was writing. Please bear in mind that i'm very ignorant on the matter and have been recently dipping my toes in vba. I'm trying to copy all sheets listed on a range from an auxiliary sheet i created. These sheets contain tables and so i had to...
  14. O

    Resize the size of a Chart when pasting from Excel to Word

    I have some VBA code Charts("Chart5").ChartArea.Copy .Selection.GoTo what:=wdGoToBookmark, Name:="FG5" wdApp.Selection.PasteSpecial Link:=False, DataType:=wdPasteEnhancedMetafile, Placement:=wdInLine, DisplayAsIcon:=False I'm trying to paste into word but the chart just pastes...
  15. Worf

    Excel donut chart with multiple levels

    This article shows how to create a donut chart with multiple levels. Figure 1 shows how to arrange the source data in order to get the layers. If necessary, you can have two starting angles. To accomplish that, use a secondary axis. The chart below has one series on the primary axis and the...
  16. C

    Macro for automatization filtering dates

    Hi everyone. I have a large database (pic adjointed) and I want to do a macro in which if I put a date it returns me the TIR, Duración and Nominal Outstanding of that date (dates goes from 2019 until 2015). Best,
  17. C

    Pull data from external workbook to active workbook based on a specific cell value

    Hey guys, I'm in somewhat of a pickle. I have two workbooks, the first lets call "tool.xlsm" and the other "hours.xlsx", what i am trying to do is within "tool" the user will input a value in cell Q9 and from there I need to run a macro to take that value and search that value in "hours" by...
  18. D

    Change UserForm dynamically based on input

    Hi MrExcel, I'll greatly appreciate your input re the issue below. I'm looking for an option to add elements (such as ListBoxes) to a Userform in a dynamic/interactive way: the number of ListBoxes (as well as their names, tab indices etc.) should depend on a specific input value (say, on the...
  19. J

    Macro similar to Sumifs function to update columns

    Hi there, I would like help creating a macro that can perform a task similar to sumifs function. I have a workbook with multiple tabs. The first tab is the "Main" tab and there are three tabs following labelled "USD", "EUR" and "GBP". I want to update the three currency tabs by using the...
  20. J

    Error Handling Help

    I have what is probably a simple error handling issue for most of you but I can't seem to figure it out. I have an excel userform with multiple text boxes that auto populate via a vlookup. This all works fine except for one text box I can't seem to get the error handling right for. I need a...

Some videos you may like

This Week's Hot Topics

  • Problem with Radio Button's format control
    I am creating an employee evaluation template (a sample is below) Column A is the category Column B, C D, E and F will be ratings (unacceptable...
  • Last Display on userform to a Listbox
    [CODE=vba] lstdisplay.ColumnCount = 15 lstdisplay.RowSource = "A1:O600000" [/CODE] So when i do this it Displays everything on the sheet i am...
  • Rename and move files to a new location
    Dear all, I have an excel file with the following information. The actual file name is at column A but i want to rename it using the following...
  • Help with True/False Formula
    Hello! Am stumped how to fix this formula, in which my result returns 'True', but it should return False. =IF(AG2=True...
  • Clear extra characters from a provided range of cells
    Dear All, I have following code which gives me desired output to remove extra characters from a provided range. But it takes too much time when...
  • Help with Current and highest streaks
    Hi there, I've just joined the forum and this is my first post. I've already spent quite a bit of time searching the net and this forum for a...
Top