Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
hello,
I want creat a macro which i want use delete my selection every second coulm. A_col B_col C_col 1 2 <----- want delete 3 4 <------want delete 5 Thanks/Tufail |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Tufail,
Try: '================ Public Sub Tester() Dim rng As Range Dim delRng As Range Dim i As Long Dim CalcMode As Long Set rng = Selection '<<==== CHANGE On Error GoTo XIT With Application CalcMode = .Calculation .Calculation = xlCalculationManual .ScreenUpdating = False End With For i = 2 To rng.Rows.Count Step 2 If delRng Is Nothing Then Set delRng = rng.Rows(i) Else Set delRng = Union(rng.Rows(i), delRng) End If Next i If Not delRng Is Nothing Then delRng.EntireRow.Delete End If XIT: With Application .Calculation = CalcMode .ScreenUpdating = True End With End Sub '<<================ --- Regards, Norman "Tufail" wrote in message ... hello, I want creat a macro which i want use delete my selection every second coulm. A_col B_col C_col 1 2 <----- want delete 3 4 <------want delete 5 Thanks/Tufail |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How i count coulm by conditon | Excel Discussion (Misc queries) | |||
key coulm | Excel Discussion (Misc queries) | |||
key coulm | Excel Discussion (Misc queries) | |||
Copy Selection - Transpose Selection - Delete Selection | Excel Discussion (Misc queries) | |||
Macro data selection line delete | Excel Discussion (Misc queries) |