There's some ambiguity in your description. Perhaps the best way to figure out which group the median lies in is probably to first add the frequencies to compute n (which you'll need to do anyway). Starting from the first group, successively add the group frequencies until you exceed n/2. The group which made you exceed n/2 contains the median.

Ex: given frequencies (in order) 5, 12, 3, 6, 9, 15, 25, we have n=75, so n/2 = 37.5. Successively adding frequencies from the left, we get 5, 5+12=17, 17+3=20, 20+6=26, 26+9=35, 35+15=50 > 37.5. Thus the median occurs in the second to last group, that of size 15.