vba help

  1. B

    VBA - Find and Replace - is there a better way to do this?

    I have pieced together different bits of code over the past few years to format a P&L report being generated from an accounting system. The vba is starting to run slowly and I'm trying to clean it up to make it run a faster. The report being formatted has 100 tabs and the code formats each tab...
  2. Johnny Thunder

    VBA Help - Cell1 = Cell2 But if Cell 1 is blank return blank - Excel 2016

    Hello! I am kinda stuck on something so I will explain what I am doing. I have a Form that looks kinda like a Web portal with 18 fields/dropdowns that a user can populate. This tool also has the ability to recall these fields if the user knows the tracking number, then all the fillable...
  3. E

    VBA - insert new row Y, copy row X and paste format and formulas in row Y

    Hello Sorry this could be really simple but I've spent hours and feel like I'm going round in circles! Any help would be really appreciated. I want a macro to insert a new row below the current active cell, then copy and paste format and formula from row 8 into that new row. I have been...
  4. D

    Need Help with creating a pop up window for an inventory system- VBA

    I am trying to create an inventory based database for our online orders. There are 10 different bundles that consist of multiple products that can also be shipped individually if not apart of a bundle. What I want to be able to do is create a day by day process where a window pops up asking what...
  5. B

    VBA to Delete Rows if Cell Length in Column A = 14

    Hi everyone, I'm trying to modify the VBA found: https://www.rondebruin.nl/win/s4/win001.htm to delete rows based on the cells length instead of the cells content. The website's example deletes rows that contain "ron" and the VBA works as expected. I would to like to modify so that it deletes...
  6. B

    VBA add cell value if worksheet is included in workbook

    Hello. I have a system that generates reports and names the worksheets based on a numerical sequence xx-xxx (department number). I would like to add a report title in cell A3 with the department's name based on the worksheet name (department number). The code below works as long as all of the...
  7. B

    Is there a better way to apply conditional formats with vba?

    Hello everyone. I have a large macro that has evolved over time and has become quite slow. I'm making an effort to go through the code to clean it up. There are two conditional formats in the macro that apply different conditions to the range A8:I500 based on the left values in column A. I'm...
  8. Johnny Thunder

    VBA Help - Multiple If/ElseIf Statements

    Hi guys, I am working on a project and found myself spinning in circles with this code. Hope someone can steer me in the right direction. Background:I have a menu grid with the name of 4 sheets that a user can have added to a workbook based on "True" or "False" from a drop down next to the...
  9. D

    VBA to copy values in column and Paste only values on separate sheet in workbook

    I am in need of a Macro that allows me to copy a column of 150 lines and paste only it's values in a separate worksheet in the same Workbook. Currently I have: Sub GroceryDispatchColumnCopy() Sheets("Grocery Dispatch").Select Range("E3:E150").Copy Sheets("Sheet1").Select...
  10. D

    VBA Button to clear column of text and leave just numbers

    I am pasting into column A row 1 and need a macro I can apply to a button that takes out all text from what has been pasted and leaves every row with the same digits just without text. Often times there will be up to 75 rows pasted in column A. I need a macro that I can apply to a button to...
  11. N

    Changing the Font colour of selected cells columns and rows

    Hi Guys, First time on the site. We found the following code online: Private Sub Worksheet_SelectionChange(ByVal Target As Range) If Target.Cells.Count > 1 Then Exit Sub Application.ScreenUpdating = False ' Clear the color of all the cells Cells.Font.ColorIndex = 0 With Target ' Highlight...
  12. M

    VBA - Need help running faster/refining code

    I a very green to VBA (self taught in the last 3 weeks)... I created the below code, which works but is VERY slow. I am hoping someone can help as I still need to protect/unprotect the worksheets which is only going to further impact performance. The code has 3 intended results:1) Reading a...
  13. B

    VBA Help Need - Creating a Table of Contents Sheet with Hyperlinks

    Hello everyone. I'm trying to create a macro that will insert a new tab called "SheetList" at the beginning of my workbook. This tab has "Table of Contents" in cell A4. I would like for the sheet names to be listed starting in cell B5 and continuing down until all sheets are listed. Beside the...
  14. B

    Run-time error '1004':

    I have some VBA that has worked in the past without a problem but will not run anymore. The VBA deletes all the sheets in a workbook that are not listed. If searched the forums and there are several posts that suggest replacing "Sheets" with "Worksheets", but this did not work for me. The error...
  15. B

    Delete sheets if they are not included in a list. (Not a list range)

    Hello everyone. I'm trying to delete sheets that are not included in a list. I've found some posts that explain how to delete sheets if they are not included in a list, ie an actual range cells A1:A10. However, I would like to delete the sheets listed within the VBA code not a listed range...
  16. B

    Select Case To Check Date Ranges

    Hi Guys, I am using the below code to do checks for a automated holiday spreadsheet. if first checks to see if the user has enough holiday "<26" and then checks to see if they are not trying to request more that 10 days " < 10 ". the dates are declared in two cells From " B21" To "C21" what...
  17. B

    VBA to create an error log based on IF AND statement

    Hello. I'm hoping you all can help me create a macro that will loop through multiple sheets to identify errors and log those on an ErrorLog worksheet. The excel file is a system generated report with 115 tabs. Column A = Descriptions and Column B = Values. If Column A is blank " " (there...
  18. B

    Does anyone know how to Email a List of Pivotal tables

    Hi Guys, I was wondering if anyone knows how to use Ron De Bruin Mail_Range macro to email a pivotal table. I have been using the below but have had to keep manually changing the Source Range. I was wondering if anyone knows how I can amend the Source to just refer to the active pivotal...
  19. B

    Run Time Error 438 Help

    Hi Guys, I am trying to automate the emailing of a Range using the below, but I am getting a Run Time Error 438. can anyone help. Sub EMAIL_Mail_Test() With Sheets("Sheet1") .Range("E2").CopySheets("Sheet2").Range ("B7") Mail_Range.Mail_Range .Range("E4").CopySheets("Sheet2").Range...
  20. B

    Trouble with Automating Naming Ranges (runtime error 424)

    Hi Guys, I am trying to use the below to run through values in Column A on a Sheet Named "Report" and Create these ranges in a Sheet called "Holidays_Requested" but everytime I it pops up with Object Required Runtime error 424. can anyone help or know of an alternative way of creating named...

Some videos you may like

This Week's Hot Topics

Top