I have a python macro, that does many things with my workbook, but I would like to add to it a function that goes through the columns on the first sheet, finds duplicates by row, removes any that are found, and bolds the remaining instance. The data is already sorted, so it is enough to compare the cell to the one before.
What I was thinking, in pseudocode, is:
oSheet1 = oDoc.getSheets().getByIndex(0)
for column in oSheet1:
for cell (starting from 2) in column:
if cell == cell-1:
remove(cell-1)
bold(cell)
Can anyone give examples on how to do this, or if there is a better way?
Edit: Here is an example. The sheet “Raw Data” has an example of how the data is formatted. “Desired Result” is an example of what I would like to have