Is there any particular reason why you want to use VBA for this? Could you give us an example of what your data looks like?