sht

  1. A

    Please help, this code is working fine except for one line.

    Hi there, The code below has been working fine for dates before 10/1/2019 and when the B22 cell has the value of "This Month", but whenever the B22 cell has a future date (11/1/19, 12/1/19, etc.) then the code stops working on the first line of the first For Loop. Private Sub...
  2. P

    Clearing worksheets

    I have a file that i was wondering if there was a way to write this code differently or easier. The file has 7 worksheets and a button page. i want to clear all worksheet and end up on cell A2 of the button page. Here is the code: Dim sht As Worksheet For Each sht In ActiveWorkbook.Sheets...
  3. E

    VBA to Copy Range from Muliple Worksheets in one master

    Hi All, I am hoping someone can help. I have a spread sheet with 30+ tabs and I want to copy certain named tabs for the same range on each selected tab into 1 master sheet. The below works if I have only 1 to exclude but I have multiple to exclude . how do I amend to either include 20+ sheets...
  4. D

    merge sheet vba help

    Hello everyone. Is there a way to tweak the below vba so it only merges 2 sheets from my workbook vs ALL the sheets in the workbook? For instance i need it to merge sheet name "hello" and sheet name "bye" THanks!! Sub merge() Dim wrk As Workbook Dim sht As Worksheet Dim trg As...
  5. M

    Clearing multiple sheets VBA

    Hi The code below works with only one condition in the IF statement (the first one - Summary sheet). However, when I add the other two sheet names that should NOT be cleared, it doesn't work? Do I need to change something in the IF statement? Thanks in advance. Code that works: Sub...
  6. J

    TOC unhide sheet

    Hi, i have this code that I found in the web works great just want to know how to modify it so when I click hyperlink unhide the sheets and when I click back contents hide the sheet again, thanks. Code: Sub TOC_APCHECKLIST2() 'PURPOSE: Add a Table of Contents worksheets to easily navigate to...
  7. T

    Renaming multiple copied pictures in VBA

    Hi, I am copying charts from one excel workbook (model1), and pasting them in a second excel workbook (TempFile) as a picture. There are roughly 60 of these images. I would like to rename these images. The image names keep changing, which leads to problems for the next steps. Does anyone...
  8. G

    Modifying Macro to add Column B to file name when exporting

    Hello - I found this code on the message board which works great for my purposes, expect that I am hoping to include the value in Column C to the file name when exporting. Code is below: Sub exportPages() Set Sht = Worksheets("Sheet1") ' The variable Sht now holds the sheet that should be...
  9. I

    find and replace

    Hello, I have excel file with multiple tabs and I need to find text that contains "med ctr" or "med center" or "med cent" and replace it with "medical center" and this needs to be done on every sheet in the workbook. I found a couple of different codes but none of them works the way I need or I...
  10. H

    Small change in coding

    Hi Experts, I use below code to consolidate the data from different worksheet into single worksheet.Every time I run the macro it will create a sheet name consol_Tracking then it will consolidate data from different sheet to consol tracking main sheet.now I want the macro to avoid creating...
  11. P

    Check if worksheet exists.... ?

    Trying to put a snip of code at the beginning of an Add-In I've created that will check to make sure the required worksheet exists before it tries to run the code (to avoid error). Below is not working. Any direction/guidance is appreciated. Dim sht As WorksheetDim wb As Workbook If wb Is...
  12. A

    inserting exclusion list to merge sheets macro

    hi all, I am wanting to add a bit into the merge sheets macro I use but it throws a Next without For error. The extra few lines (below in bold) seek to not merge the sheets in the workbook where there is a match to the sheet names held in a named range. Sub CopyFromWorksheets() '/// This...
  13. B

    VBA - Find and Return Cell Range (Row)

    Hi All, I been attempting to modify a code, below: My issue is here:Qfooter = foundcell.Value, instead of the just the value, I would like to pick up the entire range. Any help would be great. Thanks in advance! Sub Find_And_Return_cell_value() On Error Resume Next For Each cll In...
  14. E

    Table to Table

    I have two tables one on sht 1 and one on sht 2. Its nearly the same table, except sht 1 has detailed information about the people and sht 2 is just the first and last name. What I am trying to accomplish is when I add a new name or row to Table 1, table 2 will update with the new row and...
  15. S

    Macro to clear unlocked cells

    The past few years, I've used the following macro (which is stored in my PERSONAL xlb) to clear unlocked cells in my workbook: Sub Clearem() Dim xx As Worksheet Dim yy As Range For Each xx In ThisWorkbook.Worksheets For Each yy In xx.UsedRange.Cells If Not yy.Locked Then yy.ClearContents Next...
  16. S

    How to allow Autofill dropdown selection to cells above or below on a protected sheet.

    I have a workbook that is for internal estimating. The workbook itself has a large amount of formulas and tables that I don't want the user to be able to screw up. I have added protection through VBA to lock the workbook upon open with the below macro Private Sub Workbook_Open() Dim sht As...
  17. W

    Tips to efficient macros?

    I have a macro that freezes my workbook. After running the macro, I can move around, click cells, etc etc, but once I start typing a formula, and hit enter, excel freezes. it doesnt crash, it just freezes. I can close the workbook without ctrl alt delete. When I hit enter the formula disappears...
  18. W

    Calling a macro for each sheet in a loop

    Hello, I am struggling with trying to get my macro to go to each individual sheet and call (run) another macro Dim ary As Variant Dim sht As Variant With Sheets("SheetsToRun") ary = .Range("B1", .Range("B" & Rows.Count).End(xlUp)).Value End With For Each sht In ary...
  19. Guzzlr

    Having Trouble with Deleteing Sheets

    For Each sht In ActiveWorkbook.Worksheets If sht.Visible And sht.Name = ("ASY") And sht.Name = ("TEMP") Then sht.Delete Worksheets.Add().Name = "ASY" Worksheets.Add().Name = "TEMP" Sheets("ASY").Move After:=Sheets("DATA") Sheets("TEMP").Move After:=Sheets("ASY")...
  20. D

    VBA Assistance Please!!

    Hey Everyone, I have a workbook with 60+ worksheets, and inconsistent data ranges within each. I need to create VBA code to: Search all worksheets in the workbook for specific text within a formula: Find = "*CODE"* Replace any formula containing *CODE* with the value in the cell that the...

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