How do you select nonadjacent columns or rows in excel?

After selecting the first row or column, press and hold the ctrl key and click on the header of the next row or column you want to select.
After selecting the first row or column, press and hold the ctrl key and click on the header of the next row or column you want to select.