We study a market with horizontally differentiated products and sequential consumer search. Firms send ads to consumers to inform about their existence. Advertising may be either random or targeted. Targeting increases search intensity, which intensifies competition.On the other hand, consumers draw higher valuations for products on average under targeted advertising, which creates incentives to raise prices. The first effect dominates when search costs are sufficiently low, and the second may prevail when search costs are high. Then, prices are higher, and consumer surplus lower, under targeting when search costs are high, and lower when search costs are low. A larger cost of advertising helps firms segment the market if firms can target their ads. Prices may then be higher, and consumer surplus lower, under targeting.