Current methods of synthesis for carbon nanotubes (CNTs) usually produce heterogeneous mixtures of different nanotube diameters and thus a mixture of electronic properties. Consequently, many techniques to sort nanotubes according to their electronic type have been devised. One such method involves the chemical reaction of CNTs with aryl diazonium salts. Here we examine the reactions of electric arc produced CNTs (dispersed by a variety of surfactants and polymers in aqueous solution) with 4-bromo-, 4-nitro-, and 4-carboxybenzenediazonium tetrafluoroborate salts in order to find conditions for maximum selectivity. Reactions were monitored through the semiconducting S 22 and metallic M 11 transitions in the UV-vis-NIR absorbance spectra of the nanotube dispersions. Selectivity was observed to depend heavily on the type of surfactant, the type of diazonium salt and its concentration, the reaction temperature, and the solution pH. Additionally, the surfactant concentration was found to exert a significant influence as the dediazoniation product yields are affected by this parameter. For certain combinations of surfactant and diazonium salt the selectivity is markedly improved, particularly in dispersions of nonionic surfactants Pluronic F-127 and Brij S-100, which are similar in structure. Smaller diameter HiPCO nanotubes were better functionalized in dispersions of Triton X-405. The greater selectivity afforded by these poly(ethylene oxide) containing polymers is postulated to arise from electron donation provided by their ether oxygens. The ionic surfactant sodium dodecyl sulfate was found to display unique behavior in that semiconducting nanotubes were preferentially functionalized at natural pH, likely due charge localization interactions with the surfactant.