vba

  1. J

    Split a worksheet to separate workbooks by column using VBA in Excel 365

    Hi there, I have situation that requires me to split salary data per department so that each manager will receive a workbook for their team only. I do not mail these out to managers, I simply safe it in their respective folder on the server. I use this code, but this code does not split the...
  2. D

    Insert row below named range while extending that range

    Good evening all, Question... (obviously) Is there a way of making a VBA to insert a single row below the last 'Dep' 'C:C' while extending the range, "B4:J8" has been named "Third_Party", "B9:J10" = "QC", etc... While the formulae in "D8:J8" (also in the named range of Third_Party) would just...
  3. dejhantulip

    Math operation between a column with unique formulas and another column

    Hello guys! So I've been having this situation quite often, and I have searched and thought of something to solve my problem but haven't been able to find anything. I have a two columns. Column F and G. In Column F I have several rows of information, each row is unique, some are values and...
  4. D

    run my code in every 15 min

    M not able to run this code in every 15 min ...someone pls help me ... the code start at 9;15 am and it's copy the value in every second from RTD data from Column 2 (in subsequent rows) but i want that the code copy data in every 15 min only. Suppose at 9:30 am the code starts and copy the value...
  5. W

    Form Closses but written conditions not implemented

    Hello: I have the following two codes in a button: The (first code) aims to submit value of option button into worksheet cell: For Each FormControl In Me.Controls 'Check only OptionButtons If TypeName(FormControl) = "OptionButton" Then 'Check the status of the OptionButton...
  6. U

    Extracting common numbers from two cells with comma-separated numbers

    Is there a simple way to extract common numbers from two cells with comma-separated numbers? I have cells with 12 comma separated numbers in each cell. (They are not all unique. Some numbers can be repeated twice. but never more than twice. Numbers are all positive, and one or two digit numbers...
  7. B

    Simple CountIf VBA

    Hello, I'd like to transfer this macro recorder into an unlimited cell countif in cell E2. I don't see where my value in "a2" is being recorded? Range("E2").Select Application.CutCopyMode = False ActiveCell.FormulaR1C1 = "=COUNTIF(C[2],RC[-4])" Range("E2").Select...
  8. L

    Pass data from a userform to a variable within a macro

    Hi! I'm working on a macro which graphs columns selected with an input box, and I'm trying to change these input boxes to userforms (in order to decrease the amount of popups for the user). However, I'm unsure of how to assign cells selected in a userform to variables which can be used in a...
  9. D

    Create macro that sends out emails when quantity is less than or equal to minimum stock

    Hello everybody, My current excel-file looks like this: I would like to create a macro that, once I click on it, checks if the quantity is less than or equal to the minimum stock. So in the photo, for row 2 where material number "6046100" has a minimum stock of "1" and the quantity on the...
  10. W

    VBA CODE to vllokup and get multiple results

    I have a requirement where there are set of values in A column of sheet1. These values in column A are mapped to multiple values in sheet2 of A and B column. I need a VBA code where it gives me the unquiet list of mapped items in horizontal manner. So the result must reflect in B2, B3, B4 etc...
  11. Elaszat

    Labeling tool hiccups

    Hello, there is a problem I have with my labeling tool I wrote for Excel. I'm afraid I have to go a while back on that. I'm working in an office where we have to print labels for our articles that we sell. It used to be a tedious process with lots of folders of examples on how to write the...
  12. V

    Passing Texbox string array to countif formula in Excel

    Trying to get an Array to work with Formula Countif, but cant manage to get the countif right, can anyone give me a pointer please? I have a userform with 5 textboxes on it add a search word in 1 or maybe 2 i wanted them to use the countif formula. Sorry if this seems simple to you guys im...
  13. C

    Combine lists with similar headers

    I have a spreadsheet with hundreds of lists that each have a header and vary in length. The headers all follow a similar format (ABCD 123AB) and I want all columns for which the headers share the first 8 characters (including the space) to be combined into a single column with the header being...
  14. E

    Macro to copy tab from closed workbook not working

    Hi all, The below code doesn't seem to be working: Sub CopySheet() Application.ScreenUpdating = False Set closedBook = Workbooks.Open("C:\Users\040429\Documents\Workings\Excel\_Holidays_.xlsb") closedBook.Sheets("Holidays ").Copy Before:=ThisWorkbook.ActiveSheet...
  15. S

    Protect/Unprotect worksheet VBA BUTTON?

    Hello all, context: I have created an employee holiday/leave sheet on (we use Excel 365) I have made a sheet for each month and they require 'protecting' and 'unprotecting' seperately/individually - with a password query: My team is not so computer literate so, I need to create an easy to...
  16. D

    Convert Excel to PDF before sending out automatically by email

    Hello Everybody, I am currently trying to create an Excel macro that converts my excel sheet into a PDF file and then sends it out by email. My current macro can do this, but it cannot convert it to a PDF file. I tried to merge my current VBA formula with the one here: to convert my excel...
  17. U

    If criteria1 does not exist then...

    Hi all, This is a pretty common question but I can't seem to find a solution that works for me. I have the following code that is supposed to apply autofilter but if the criteria does not exist, I want it to turn off the filter and end if. However, the line If currentBoxRange.Offset(-1...
  18. B

    Can I use VBA to make my printer print borderless

    I have a spreadsheet with 4 different tabs, the first of which is a cover page with a picture added to the header. This picture needs to be printed as borderless, which I can do manually each time, but for some reason this resets when I close Excel and reopen. Is there any code I can add to...
  19. A

    Running macro after data retrieve is slow

    Hi All, I have a MS SQL stored procedure returning data to excel. After retrieval I carry out some actions using a macro. When I run the query and then run the macro, the macro takes a long time. If I run the query save, close and reopen the workbook and run the macro first, then it executes...
  20. F

    VBA - 1004 Error #Ref

    Hello, I'm back again, let me just say that I found this website to be very helpful. I currently have a script that was created by an external source. I don't have access to that person anymore. When I try running the script its returning a 1004 error (see attachment). From what i can see...

Some videos you may like

This Week's Hot Topics

Top