In order to divide communities accurately in weighted networks, a hierarchical clustering method IEM based on the similarity and modularity is proposed. Firstly, the similarity of the two nodes is defined based on attributes of their common neighbors. Then, the most closely related nodes are clustered fastly according to their similarity to form the initial community and expand it. Lastly, these communities are merged with the goal of maxmizing the modularity so as to optimize division re sults. The algorithm achieves more reasonable and effective community division for weighted network by three steps of initializing, expanding and merging communities. Correctness and effectiveness of the algorithm are verified through experiments on many weighted networks using weighted modularity as evaluation index. Results show that IEM is superior to weighted CN, weighted AA and weighted RA. Moreover, it can achieve the higher quality of community division in weighted networks compared with CRMA algorithm.