Another very useful tool for getting external data is Microsoft Query. You can use this to bring live data into a spreadsheet or pivot table. Access MS Query by selecting 'Data->Get External Data>New Database Query' then follow the Query Wizard to define the datalink. After you have a query...
Not a function but...
Here's anohter way of doing this that is faster and eliminates the for looping. Of course you will need to add this to the OnChange Event of the Worksheet for each worksheet you would want to have the action on.
---------------
Private Sub Worksheet_Change(ByVal Target As...