Dear Forum,
I would like to remove some cells only not the whole line using some criteria ( ie (cell including "LInterf" ) over VBA, so Is it possible?
To clarify my problem I attached some file for your reference.
Thx
Amrane
Dear Forum,
I would like to remove some cells only not the whole line using some criteria ( ie (cell including "LInterf" ) over VBA, so Is it possible?
To clarify my problem I attached some file for your reference.
Thx
Amrane
Presuming you mean that you do not want to delete the entire Row, what cells are to be deleted, and which way are we shifting cells?
Dear Mr GTO
Thx for reply,so
I want to remove those including"LInterf" in the column "M" ( yellow color).
the other cell will be shifted toward upper way. ( see my privious excel sheet)
Thx in advance.
Amrane
Hi Amrane,
I still feel I am misunderstanding, but here's an example to see. To delete/shift up the cells you have marked in yellow...
In a junk copy of your wb:
Option Explicit Sub exa() Dim wks As Worksheet Dim i As Long Set wks = ThisWorkbook.Worksheets("Sheet1") '<--- Change sheetname to suit With wks For i = .Cells(.Rows.Count, "M").End(xlUp).Row To 2 Step -1 If .Cells(i, "M").Value = "LInterf" Then Range(.Cells(i, "D"), .Cells(i, "M")).Delete xlShiftUp End If Next End With End Sub
Dear GTO
Great
Thx, this will solve my headache.
Amrane