Hi ,
I am new to VBA programming ,
I found the following function that was used to delete duplicate entries in the column F.
Dim x1 As Long Dim LastRow As Long LastRow = Range("F500").End(xlUp).Row For x1 = LastRow To 1 Step -1 If Application.WorksheetFunction.CountIf(Range("F1:F" & x1), Range("F" & x1).Text) > 1 Then Range("F" & x1).EntireRow.Delete End If Next x1
I am trying to understand and interpret the below function
Application.WorksheetFunction.CountIf(Range("F1:F" & x1), Range("F" & x1).Text)
Please let me know what this statement exactly does .
Thanks,
Krsna.
Last edited by Leith Ross; 05-17-2011 at 05:18 AM. Reason: Added Code Tags
hi, krsna83_pp, please check attachment, column C, same Excel CountIF formula is used.
The code does exactly the same moving every time 1 row up and counting occurances of value in the range F1:F...
Thanks much ,,,makes sense now .
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks