Preheat oven to 350 degrees. Melt butter in a large, heavy saucepan with onion. Add flour and whisk on medium low heat until flour is "cooked." This is a roux, but you don't want it to brown. It should be yellow in color.
Slowly add half and half and sherry, stirring all the while, until the mixture becomes thick. You may want to turn the heat up a bit but be sure not to let the sauce boil and be sure to keep whisking.
Add salt and pepper, and then the shredded cheese, stirring until melted. Taste and adjust the seasonings.
Remove sauce from heat. Slowly add the macaroni, stirring until the mixture is thick and creamy. You may not need all the macaroni - you are looking for a very cheesy mixture.
Pour the macaroni and cheese into a greased casserole dish. Top with buttered or toasted bread crumbs, or crushed potato chips. Bake at 350 degrees until hot and bubbly. Let sit for about 10 minutes before serving.