sht

  1. B

    VBA to copy data from one worksheet and paste to multiple sheets in a different worksheet

    Good morning, This is probably a simple one. I am trying to copy data in a specific cell in one worksheet, and then paste that data on multiple sheets in a new worksheet. I need to find the next blank row in the "pasting" sheets and paste the copied data there. Here is what I have so far...
  2. M

    Insert tab name for multiple tabs using vba

    Hi, I have 20 excel tabs, which each representing a restaurant outlet. I would like to have the tab name indicating in cell B1 to cell M1 for each tab except this Master tab. Below is my code: Sub Insert_Tab_Name() Dim sht As Worksheet For Each sht In ActiveWorkbook.Worksheets If sht.Name <>...
  3. D

    What is wrong with this vba code

    Dim sht As Worksheet Set sht = ActiveSheet Sheets("sheet2").Shapes("ImgG").Copy Sheets("NPSS_quote_sheet").Paste _ Destination:=Worksheets("NPSS_quote_sheet").Range("sht.Cells.SpecialCells(xlCellTypeLastCell).Row"+4) I have a worksheet, NPSS_quote_sheet that I need to paste a...
  4. AOB

    VBA to flatten tables (ListObjects) to ranges (XL2013)

    Hi everybody, I need some code to convert all tables in a workbook to "flat" ranges (that is, retain the data, just get rid of the table structure around it) I thought this would be fairly straightforward : Public Sub FlattenTables() Dim sht As Worksheet Dim lso As ListObject For...
  5. K

    Object Error

    Hi Everyone, I am having trouble on two fronts with this code. First it doesn't like ("Sht") so the person can identify which sheet to activate. Second it doesn't like the erow statement. Dim Sht As String Sht = InputBox("Please enter the period name") Worksheets("Sht").Activate...
  6. G

    Problems With "If Sheet Exists"

    Sub Main_Import() Dim sht As Integer Dim worksheetexists As String ' Dim Wsht As Integer ThisWorkbook.Unprotect sht = Application.Sheets.Count worksheetexists = False For x = 1 To sht If Worksheets(x).Name = "PDF2Text" Then worksheetsexists = True Exit For End...
  7. C

    VBA to Copy multiple worksheets into one, on a separate workbook.

    Good Morning, I've got a VBA query in a report which copies all the data and consolidates onto one sheet (there is a tab for each working day of the month) now to reduce to size of the file, I want to put this code in a standalone spreadsheet that would open the existing file, and then copy all...
  8. G

    Adding a Sheet if It's Not There to Delete

    For Each sht In ActiveWorkbook.Worksheets If sht.Visible And (sht.Name = "NonFormat") Then sht.Delete End If Next sht Sheets.Add After:=Sheets(Sheets.Count) Sheets(Sheets.Count).Name = "NonFormat" Hello All, The following will delete the NonFormat sheet, and then add a new...
  9. L

    Array loop keeps replacing data

    Hey people, Could I ask some help on this please. I have put together a replace macro that reads a table to from an array to then find and replace data. Problem is, it keeps looping and replacing the data over and over. Help would be apprecited. I'm basiclly searching a list of 1-4 digit...
  10. W

    VBA Delete Row If Cell Contains Value Works For First Sheet But Won't Loop

    The following VBA works for the first sheet that it begins on but won't carry out the same task in the following sheets even though I thought I had coded it correctly to do so, I am not gettin any error message but it just isn't looping, here is what I am using: Dim sht As Worksheet For Each...
  11. W

    VBA Only Updating Active Sheet But Is Coded To Loop

    Hello – I am trying to run this loop where I autofill Column M from M5 all the way down to the last row (last row is based on Column E). It performs just fine for the sheet I run it on but then it just stops. No error message or anything but it fails to continue the process throughout the...
  12. S

    Hide Rows on All Sheets Based on Value

    Hi, I currently have a VBA script that hides the rows on a worksheet if that row has the text "Hide" within the range A5:A100. I am trying to adapt it to automatically do this on every worksheet at once. This is where I am at (which is not working): Sub Hide_Zero_Rows() Dim sht As Worksheet...
  13. K

    Run one macro for all macros instead of doing it one by one

    Hello, I have the following code with 2 macros and will like to run it all at once, how can I do this? Thanks Sub SaveSheetsAsFiles() Dim SheetsToSave SheetsToSave = Array("Rainbow", "RLN-Net Realization", "RLN-Red Rev", "RLN-COGS", "RLN-Logistics", "RLN-R&D", "RLN-Selling"...
  14. R

    Repeat this macro for all sheets in a workbook

    How to I change the code below so it will run for all sheets in the workbook? Sub Splitbook() MyPath = ThisWorkbook.Path For Each sht In ThisWorkbook.Sheets sht.Copy ActiveSheet.Cells.Copy ActiveSheet.Cells.PasteSpecial Paste:=xlPasteValues ActiveSheet.Cells.PasteSpecial Paste:=xlPasteFormats...
  15. V

    Need Code edit - 3

    Hello All, Getting error on this, can someone there to guide. Need correction.. Set sht = Application.Workbooks(Application.UserName & "." & "xlsx").Sheets(NewSh) NewSh is Sheet Name. It is also Application.UserName
  16. E

    VBA locking sheets password error

    I wrote some code to protect all my sheets at once with a password and it works great when executed with F5. when I try to unprotect the sheets manually with the same password I get the error message: "The password you supplies is not correct. Verify that the CAPS LOCK key is off and be sure to...
  17. J

    VBA TRIM Column

    Hi guys, can someone help to fix my macro? Thanks, Sub Trim_column() Dim LastRow As Long Dim Sht as Worksheet Set Sht = ActiveWorkbook.Sheets("DataBase") With Sht LastRow = .Cells.Find("*", SearchOrder:=xlByRows, SearchDirection:=xlPrevious).Row .Range("A2:A" & LastRow).value =...
  18. D

    Problem with VBA formula

    Hi! I am encountering a Compile error: Syntax error with the VBA coding. I would like to refer to column "Q" and produce the result of "CMS/DMS/SMS" in column "AX". Do anyone know how can I fill up the formula to the last row? The formula is...
  19. J

    Next Without For Combile Error - For a loop

    Hi All, I am receiving a compile error “Next without For” for a loop I am trying tocreate. I need the codeto loop through all the spreadsheets in a workbook, search for the word investigate in column W,if found copy cell A2 and paste the value into Column B in the “Master” spreadsheetin...
  20. E

    change data series for multiple charts

    Hello - I found this VBA that changes the data series for all of the charts in my workbook. Works great. 1. How do I change so that it only changes the charts on a sheet, and not the entire workbook... 2. Possible to also only change selected charts? Thank you. Sub ChangeAllCharts()...

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