Skip to main content

Posts

Showing posts with the label active sheet

Macro code to check duplicate in excel column,Blank all Worksheets

Macro code to check duplicate in excel column This is simple Macro code example to check duplicate in excel column. If you have very long list data in single column and have lot of duplicate or redundant data then its headache to find duplicate value. By using following code tricks you can find it easily in excel. Function LastRow(ByVal Filename As String) As Long Dim ix As Long ix = Worksheets(Filename).UsedRange.Row - 1 + Worksheets(Filename).UsedRange.Rows.Count ' ix = ActiveSheet.UsedRange.Row - 1 + ActiveSheet.UsedRange.Rows.Count LastRow = ix End Function Function LastCol(ByVal Filename As String) As String Dim ix As Integer ix = Worksheets(Filename).UsedRange.Column - 1 + Worksheets(Filename).UsedRange.Columns.Count LastCol = ConvertToLetter(ix) End Function Function ConvertToLetter(iCol As Integer) As String ' Dim iAlpha As Integer ' Dim iRemainder As Integer ' iAlpha = Int(iCol / 27) ' iRemainder = iCol...