1. willow1985

    VBA for verifying whether a specific worksheet and cell have data or not

    Hello, I believe I am looking for a very simple VBA code but am not sure because of how my current Macro is structured. During one point while my macro is running it checks a certain cell (B16) and if it is blank it will issue a message, "No Results" and will end sub. If there is results it...
  2. willow1985

    Macro code keeps getting hung up

    Hello, I have the below code that used to run fine but now it seems to be getting hung up and excel now freezes and the macro does not complete. Any idea what could be causing this? Thank you Application.ScreenUpdating = False Application.Calculation = xlCalculationManual...
  3. L

    Help needed with Macro

    Hi Everyone, I am hoping someone can help me with my issue. I am trying to create a macro but there is one part where I am stuck. I need to insert a column, enter in 0 and convert to number with 2 spaces. I am having two issues. 1. if i select the whole column it will add 0.00 all the way to end...
  4. A

    VBA help needed urgently

    Hi Guys, I have recorded the following macro Sub Macro1() Cells.Select Selection.Copy Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False Range("C1").Select Range("$A$1:$C$500").AutoFilter Field:=3, Criteria1:="="...
  5. C

    VBA code workthrough, this way is causing run-time error

    OK so this has been working but now im getting a runtime error when it gets to this code. Any advice? Greatly appreciated. Sub Prep() ' Prep Macro ' Hide and prep columns for final save ' ' Resize and hide columns Columns("A:A").ColumnWidth = 5...
  6. T

    Delete all rows VBA

    Hi Guys, Is there a way to delete all the rows int he selected autofilter in the below code. At the moment it only looks as rows 2:29. Thanks Sub Macro1() ActiveSheet.ListObjects("Brecon_Mail_Merge").Range.AutoFilter Field:=12, _ Criteria1:="Non Ford" Rows("2:29").Select...
  7. A

    Need help to simplify VB code

    Can someone help to simplify following VB code If I use something unnecessarily like "Select" etc.
  8. E

    Run macro, lose Named Ranges

    Hi guys, I have a macro which does exactly what I need it to. The macro is run and then there is another summary tab whichuses formulas with Named Ranges to calculate values. There are 3 Named Ranges: (on ZTDA Tracker tab) Units:K:K Pickers:I:I Location:H:H When I run my macro, the...
  9. B

    xlPasteFormats Not working in Office 365

    Hi I have the code below in Office 365. The issue that I have are that it didn't want to copy the format correct, even if I add the following code. Selection.PasteSpecial Paste:=xlPasteFormats, Operation:=xlNone, SkipBlanks _ :=False, Transpose:=False If I run this code...
  10. K

    New to VBA and need help with a macro

    Hi, So i am working on a macro that will allow me to open a window in workbook 1 to find an excel report file and then format that report. Once the format is complete it then copies and pastes to workbook 1 to the specified tab so that the original file is not touched or modified. I have 3...
  11. R

    Change the range of a macro automatically

    Dears, I want to change the range that the macro pulls automatically, as below: Sub Weekly() ' ' Weekly Macro ' ' Range("A2").Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection, Selection.End(xlToRight)).Select Range(Selection...
  12. B

    On error resume next find?

    Hello, I have the small pasted VBA below. I was wondering what code can I add in so that if it cannot find, it will move onto the next find? Thanks! Dim rngName As Range Set rngName = Range("L1:CA1").Find("Name") Range(rngName, rngName.End(xlDown)).Select Selection.Delete...
  13. Leandroarb

    Loop to Selection.Delete Shift:=xlUp

    Hi, Please, a need delete cells equal "*". I try use this code: Sub DelTry() On Error Resume Next Do While ActiveCell <> "" If ActiveCell.Value <> "*" Then ActiveCell.Offset(1, 0).Select Else Selection.Delete Shift:=xlUp End If Loop End Sub But... suceless :( The datas...
  14. Brian from Maui

    Extend Macro

    Aloha, I recorded the following macro and would like to extend the macro to row 1,000. The macro inserts a row, deletes column C, then cuts cells A5 and B5 and paste the cells in F2 and G2. It then deletes 8 rows. Then it repeats the process Thanks Sub Macro1() ' ' Macro1 Macro ' '...
  15. D

    VBA code for autofill until empty

    Hi All, Can you please help me by adjusting this VBA for autofill until empty and not until cell "C346"? Thank you very much!! ' Keyboard Shortcut: Ctrl+y ' Columns("A:A").Select Selection.ColumnWidth = 8.57 Columns("A:A").EntireColumn.AutoFit...
  16. B

    Edit VBA to stop deleting rows and columns

    Trying to modify VBA in macro that we use to produce payroll data. The report process generates an Excel file, but it has 2 issues that I need to solve. 1. Stop deleting first 4 rows. 2. Stop deleting any columns. The original report (from Pentaho 3.8) creates extra columns and merged columns...
  17. L

    On Error Loop

    Hi good people!, This is my code: On Error GoTo a: Windows("Patron_Actives_Extract.csv").Activate Rows("1:3").Select Selection.Delete Shift:=xlUp Cells.Select Cells.EntireColumn.AutoFit Columns("C:C").Select Selection.Delete Shift:=xlToLeft Columns("E:G").Select...
  18. U

    VBA Code to delete unneeded cells not working as intended

    Edit: I solved this right after posting. Solution is at the bottom in case you wanted to try to figure it out yourself. Hello, My workbook has a sheet which contains eleven pages worth of cells to be printed. Three of these pages are required, but the other eight are only to be printed if they...
  19. P

    Copy Paste inside .exe isn't working only when I start it from inside Excel VBA

    I have the following VBA program that kicks off an .exe. The .exe was built using AutoIT, which captures mouse clicks and other things. When I run the .exe outside of the VBA program, everything works perfectly - however, when I run it from within the VBA, everything works except the copy and...
  20. U

    VBA Macro-assigned button to lock everything and delete the button

    Hello, I have a workbook with a a button, which I want to lock everything and delete the button. The following is the code: <code> Sub LockEverythingAndDeleteTheButton() Application.CutCopyMode = False 'clears clipboard ActiveSheet.Shapes.Range(Array("Rectangle 1")).Select 'selects export...

Watch MrExcel Video

This Week's Hot Topics

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
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 "".
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