ws.name

  1. K

    looping through worksheet & call a subroutine

    Hi, I have the code Dim ws As WorksheetFor Each ws In Workbooks("iteration_status.xlsm").Worksheets If ws.Name <> "dd" And ws.Name <> "Summary" Then Call CCIT6 End If Next End Sub where CCIT6 is Range("B7").End(xlToRight).AutoFilter Field:=4, Criteria1:="IT6"Range(Range(Range("B8")...
  2. L

    vba code to copy certain columns from multiple sheets into summary sheet and remove duplicates

    Hello. I am fairly new to VBA. I have a workbook with over 50 active sheets, each sheet could have different number of rows. I need to create a Macro to search through the majority of the sheets (some sheets are excluded) and if column T is >90 then copy columns A and T into a Summary sheet. I...
  3. V

    Copy paste problem

    Hi All, Im facing copy paste problem in red line. Can anyone suggest, the correction here.. Sub fnCombine() Sheets.Add(After:=Sheets(Sheets.Count)).Name = "Combine" Dim ws As Worksheet For Each ws In ThisWorkbook.Sheets If ws.Name = "Atlantic" Or ws.Name = "South" Or ws.Name = "Midwest" Or...
  4. E

    Problems to filter a pivot table with a date

    Hello Guys! I've been searching a lot looking for a solution to my problem and seems like this problem has been solved a lot out there, but those solutions doesn't apply to my case or i'm surely missing something. I'm making a dashboard that refreshes everything on it, depending on a date...
  5. H

    copy data on all sheets except specified sheets

    I have a macro to copy data from row B3 to the last row containing data in C3 on all sheets except specified sheets and all formulas to remain intact-see specified sheets not to be affected in code for eg Main Menu, YTD-Dashboard etc Row B3 onwards in being copied on some of the specified...
  6. B

    ws.Name Like - Isn't working?

    Hi Could someone help me with these 2 lines in red; Dim ws As Worksheet If CheckBox1 = True Then If ws.Name Like "*3CT*" Then ws.Visible = xlSheetVisible End If ElseIf CheckBox2 = True Then If ws.Name Like "*3CT*" Then...
  7. M

    Excel Macro to print sheets as pdf and then email - bug fix

    I've got a weekly timesheets spreadsheet that I use for my payrun each week and I was hoping to use a macro to print the individual sheets for each staff member to a pdf and then email it to them. I've got the intended filename for the pdf in cell B1 on each sheet The staff members email address...
  8. R

    Copy Paste Special Values, on Dynamic Sheet List

    I'm trying to copy all records in between columns A:CB, through the last row. This is on sheets where I won't know what their name is, but I do know what it won't be. The following code isn't producing anything: Sub CopyPaste_ClientSheets() Dim ws As Worksheet Dim LastRow As Long For Each...
  9. R

    Copy and Paste Rows Until Condition is Met

    I have this code in the "This Workbook" section. It functions well, but not perfectly. I'd like for it to continue the copy and paste routine until the value in column BZ, in the LastRow, = "Current". For some reason, it only pastes 2 or 3 rows at a time. What change do I need to make to the...
  10. H

    Referring to another sheet and going back to original sheet within loop

    Dear all, I have a problem with the following macro: Sheets("X").SelectRange("A2").Select ActiveCell.SpecialCells(xlLastCell).Select LastCellData = ActiveCell.Address LastRowNew = ActiveCell.Row For Each ws In Worksheets If (ws.Name <> "Overview") And (ws.Name <> "X") And (ws.Name <>...
  11. F

    VBA: Add item to sheet if not currently in it

    Hi everyone I have a workbook with approx. 20 sheets, 10 with the same list of people and then a master list which each of those 10 sheets is looking up for further info. I've written some code but am missing the final piece of the jigsaw, I want to loop through each sheet where there is the...
  12. N

    How do I adjust the code so that I posts in CDR A3 rather than A2? Combines two worksheets into one worksheets posting values.

    Trying to adjust code so that it posts .values on line A3 rather than A2... Thank you I adjusted 'first empty row from +1 to +2 but gives me a blank row between two sheets.... Sub CDRCombine() Application.ScreenUpdating = False Dim wsCDR As Worksheet Dim LastRowWs As Long...
  13. N

    How do I get this VBA to paste values?

    How do I adjust this VBA to paste values? Sub CDRCombine() Application.ScreenUpdating = False Dim wsCDR As Worksheet Dim LastRowWs As Long Dim LastRowCDR As Long Dim StartRowCDR As Long Set wsCDR = ThisWorkbook.Worksheets("CDR") LastRowCDR =...
  14. N

    How Do I adjust VBA code to only combine 2 worksheets rather than all worksheets...

    Trying to only combine sheet ("XPO" and "DDD"). I tried this exclusion If ws.Name <> "Stuff" And ws.Name <> "Data" And ws.Name <> "Next Injection" And ws.Name <> "Pull Through" And ws.Name <> "CDR" And ws.Name <> "Acct-W-Syr" And ws.Name <> "Pres-W-Syr" Then but I'm getting error and it is...
  15. J

    Macro to list sheet names that match a criterion

    After searching for examples, I found a code that I'm trying to manipulate to fit my needs here: example I'm trying to make a list (as column headers) of all the worksheets in a summary workbook for all of the worksheets that have a MM-DD-YY format. I can get the code to work, and list the...
  16. L

    Debug Print output in msgbox

    How can I get the Debug.Print immediate window results to display in a msg box once all the values are found? Sub PlayerSessions() Dim rngCell As Range Dim ws As Worksheet Dim lngLstRow As Long Dim lngLstCol As Long Dim strSearch As String Dim txt As String strSearch = InputBox("Please...
  17. C

    VBA to Compile List from Multile Sheets.

    Hi, I'm stumped with the following problem. I have a software output that is exported to Excel in a matrix with combined text and numbers. There are merged cells left right and center BUT I prefer NOT to unmerge them if possible for ease of visual analysis later. Several tabs each...
  18. A

    Why am I seeing a Run-time Error 1004

    I have created a macro that takes one file, parses the data in to separate tabs, then takes those individual tabs and paste them into a format for another file (Appendix A), and saves it as a PDF / XLSX based off the following file format: Appendix A_Name_Client Name_Effective Date. I am...
  19. P

    VBA Loop not error

    Hi there, I have a script which rolls accounting periods from one period into the next keeping the formulas while paste valuing the previous period. The script also excludes certain sheets which are working fine. However, the script returns an error at the below line (in red bold) on the last...
  20. J

    Renaming specific excel sheets using macro and cell value

    Hello, I am looking for some help, I have a spreadsheet that has 8 tabs, 5 of those I was looking to rename based on cell B14 in that sheet. I was trying something like this but I can't figure out how to have it select the correct B14 value and change only those tabs I need to rename. 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