Code works for me on the dataset, with the dataset in column A. Trystepping through the code using the F8 key in the VBE, and see what theimmediate window tells you.