Комментарии:
HI Chester
if i select multiple rows how i can delete
how to change row 2 with selected, hhmmm for example i klik no 5 then delete the number 5
ОтветитьGreat information, however a bit incomplete.
I don't know how many rows I have in my table and I want to delete all rows but the header. How do I do that?
Thanks
Hello,
Very helpful video. I have one question, how to delete all the rows. Thanks
Hi Chester. Thanks for this video. Is there any way to define the column by its header name instead of it's row number? The structure of my table is not fully stable and I would like to prevent my script from breaking after the insertion/removal of other columns.
ОтветитьThank you sir, I have 2 questions if you don't mind
1. How can I use this code in multiple sheets with different names.
2. How can I apply this code to multiple sheets.
Thank you again.
Hello SIr,
How to - to remove duplicates within a row by Excel VBA ?
Example
597 2733 2710 2710 2687 2687 2687 2687
597 2710 2688 2688 2687 2687 2687 2687
597 2688 2713 2713 2734 2734 2734 2734
Need this one for final code:
597 2733 2710 2687
597 2710 2688 2687
597 2688 2713 2734
We found a code with only mark, but not delete.
Can you help for us ?
Sub DuplicateValuesFromRow()
'Declare All Variables.
Dim myCell As Range
Dim myRow As Integer
Dim myRange As Range
Dim myCol As Integer
Dim i As Integer
'Count Number of Rows and Columns
myRow = Range(Cells(1, 1), Cells(1, 1).End(xlDown)).Count
myCol = Range(Cells(1, 1), Cells(1, 1).End(xlToRight)).Count
'Loop Each Row To Check Duplicate Values and Highlight cells.
For i = 2 To myRow
Set myRange = Range(Cells(i, 2), Cells(i, myCol))
For Each myCell In myRange
If WorksheetFunction.CountIf(myRange, myCell.Value) > 1 Then
myCell.Interior.ColorIndex = 3
End If
Next
Next
End Sub