shift=xlup

  1. 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:="="...
  2. A

    Error Deleting the Rows Of A Filtered Range

    I am trying to delete the rows on a filtered worksheet with this code: .Range("A:R").AdvancedFilter Action:=xlFilterInPlace, CriteriaRange:=ws_vhold.Range("A2:A3") Set RngList = .Range("A1:R" & .Cells(Rows.Count, "A").End(xlUp).Row).SpecialCells(xlCellTypeVisible) RngList.Resize(Rows.Count -...
  3. B

    VBA Failure to delete!

    What’s wrong with my code? Each cName is found on each sheet and the Delete procedure is performed. (as witnessed during debugging) However, only Sheets(“Net”) and (“ADJ”) Ranges actually get deleted. Identical code for any sheet between (“Net”) and (“ADJ”) the Range remains. During...
  4. sharky12345

    Delete range and shift up

    I'm trying to find a way to delete a range, (not the whole row), and shifting cells up but using the Listindex property of a Listbox as the row reference. I have stored the row number as 'Row' but need to know how I can use it in the following: Range("A12:L12").Delete Shift:=xlUp A simple...
  5. 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...
  6. F

    VBA Delete Shift:=xlUp Alternative (Looking For A Different Method That Doesn't Destroy Formatting)

    This is a snippet of what I have, but I'm looking for another method that won't ruin formatting on a table. Dim es As Worksheet, WSC As Worksheet Set es = Worksheets("Master Employee List") Set WSC = Worksheets("Testme") r = Application.Match(emp, es.Range("A:A"), 0) es.Rows(r).Delete...
  7. 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...
  8. 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 ' '...
  9. N

    Shifting particular Range of cells in a row upwards by a delete button but without disturbing a defined row which should not move upwards and contents

    Hi Anyone My range is from "C2 : F16" As of now i am deleting particular range of cells in a row. i've used the following code to delete the particular range of cells in a row which is working fine <code> Option Expilict Public curRow as integer Private Sub UserForm_Initialize() curRow =...
  10. 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...
  11. jbesclapez

    Filter 7 columns and delete row on filter is "empty"

    Hello, I am using this code now to filter on 7 columns and delete the entire row if cell is empty. But it takes too long... can you fix it or point me to the right code? I noticed the problem is when it reachers Selection.Delete Shift:=xlUp Thanks Sub FilterAndDeleteEmptyLines() ' ' Macro3...
  12. P

    VBA - Syntax to have VBA wait until the .exe runs before processing the rest of the code

    I have the following code that I run from an excel spreadsheet and it runs a .exe file, which opens up another excel spreadsheet and does some things. I want the program to run the .exe file and when it is finished, the spreadsheet that it opens will have been activated - at that point, I want...

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