http://utip.gov.utexas.edu/tools/Excel_Macro.xls
This macro in Excel will calculate the between-groups and within-groups components of Theil's T statistic in Excel for a two-level hierarchical grouping structure (regions and industries). The user will have to copy and paste the data of two variables (population and compensation) into the macro.