Yes, the if statement gets the job done on historical list. Do you know of anyway to get historical adv/dec from yahoo? I've heard they have bad historical stock data. So I'm sure the a/d is probably the same. Problem is I can't find any historical a/d from yahoo. Maybe I'm using wrong symbol. The only quote I get is the last day. If I go on vacation for one day I have to scrap the whole pile of data.