There are several ways to achieve what you want, of which the simplest has to be as mentioned by @chris neilsen:
Remove Duplicates
Just select your two columns then Data > Data Tools - Remove Duplicates accept the defaults (probably) and click OK. As indicated in a comment however, not all versions of Excel have such functionality.
Note the Remove - they are gone for good once the Undo stack is overwritten.
Beware also that Remove Duplicates is not totally reliable (see link in Advanced Filter below).
Advanced Filter
I tend to prefer this as Remove Duplicates may have a defect (though extremely rare to show up!):
It is mandatory (or at least highly advisable) to ensure your columns are labelled for this. Again select your two columns, then Data > Sort & Filter - Advanced, select Copy to another location, choose Copy to range (one cell is sufficient) and obviously check Unique records only.
Here Copy to is a give away to the fact that your entire original list (duplicates and all) is preserved, as may sometimes be required, without the bother of creating a copy to work on first.
COUNTIF
A formula solution may be more appropriate when the removal of duplicates is to be taken to mean both of a pair, etc.
Something like:
=COUNTIF(B:B,B1)
in B1 (assuming your labels are in Row1) and copied down to suit will identify pairs or other multiples. Having achieved the count then filter to delete the chosen selection.
COUNTIF is generally available in all Excel versions (I don't recall whether in the very earliest ones!)
COUNTIFS
Is a function only available in the more recent versions of Excel, but allows for a more complicated definition of "Duplicate" - not applicable in your example.
PivotTable
PT's aggregate Row Labels values as a matter of course, so give the appearance of removing duplicates. PT's are so useful they may well be wanted for other reasons anyway, so no extra bother for removing duplicates.
Show in Tabular Form Table layout may be most convenient (here with A
above b
in Row Labels). This should display one instance of each A/b pair - unless the A value is not the first example. In other words the display of ColumnA values does not repeat ColumnA values - just blanks that imply "same as above" until A changes. I think the most recent versions of Excel have a feature for displaying the A values on every row but it is quite easy to 'make allowances' in earlier versions.
The problem though is that since the contents of the PT cannot be altered in the way proposed below this needs to be on a copy of the data showing in the PT (not merely another version of the PT!)
Select the Column with values only at the start of each 'section', Home > Editing > Find & Select - Go To Special..., Blanks. Click on one of the selected cell, enter =
, Up arrow and CTRL+Enter.
VBA
This is a solution to almost anything "Excel" and viable for removing duplicates, though would probably not be 'cost effective' for a complete data sample of the size in your question - unless the process is required often.
I have probably missed a few other options - but no doubt they have been mentioned by others before I had barely started with this screed.