Thanks for the help. One thing about this is that I want to put this into a VBA macro so that I can get row numbers out of it and use another column (not listed) to calculate further information