I want to delete the contents from cell if the content of that cell are similar to the content of the previous cell of last column. i.e If the 10th cell of column 'A' & 10th cell of column 'B' have the identical content then I need to clear that content from column 'B',without deleting the cell itself (i.e content of the cell only not the cell itself).
@deceptikon , my data segment consists on almost Millions of records so manually its not possible.As I'm not an excel expert so I don't know that what would be the best way to do it.So, what you suggest ? I'll appericiate that.
It's not as much a matter of being an Excel expert as it is whether you want to accomplish this from the Excel UI itself or with a third party program. Since this question is in the computer science forum, I'm unable to determine if you're writing custom software to accomplish this (in which case it should go in the appropriate programming language forum) or need Excel scripting advice (where it would best be moved to the Hardware & Software forum).
As far as doing it from Excel's scripting options, it's a relatively simple matter of looping over the desired row and clearing a cell if it compares equal to another. For example:
Dim i As Double
For i = 1 To 10
If .Cells(i, "A").Value = .Cells(i, "B").Value Then
This will clear cells in the B column if they're equal to the A column for the first 10 rows in the first worksheet.