
596 So.2d 789 (1992)
Federick SOLOMON, Appellant,
v.
The STATE of Florida, Appellee.
No. 91-2287.
District Court of Appeal of Florida, Third District.
April 7, 1992.
*790 Bennett H. Brummer, Public Defender, and Sheryl J. Lowenthal, Sp. Asst. Public Defender, for appellant.
Robert A. Butterworth, Atty. Gen., and Marc E. Brandes, Asst. Atty. Gen., for appellee.
Before BASKIN, LEVY and GERSTEN, JJ.
GERSTEN, Judge.
Appellant, Federick Solomon (Solomon), appeals his conviction for sale of cocaine within one thousand feet of a school. We affirm.
On February 2, 1991, an undercover officer offered to buy cocaine from Solomon. Solomon sold the officer some cocaine, and said that he had to get more. Solomon then walked to a nearby apartment, walked inside, and returned with the rest of the drugs. The officer secured a search warrant, and on February 7, 1991, returned to Solomon's apartment to retrieve drugs.
The undercover officer entered the apartment and found several people including Solomon. The only cocaine found was on the floor, under Solomon.
Solomon was arrested and charged with two counts: 1) sale of cocaine within one thousand feet of a school, for the February 2, 1991, transaction; and, 2) possession of cocaine with intent to sell, for the February 7, 1991, search and seizure. Prior to trial, Solomon moved to sever the two counts, arguing that the two charges were unrelated. The trial court denied the motion to sever.
At trial, the State called a chemist, who testified that the sample she tested was cocaine. During cross-examination, defense counsel asked the chemist questions concerning office procedure for documenting evidence. The chemist responded:
If you have any doubts as to the procedures of evidence through our laboratory, you can always ask a supervisor.
Solomon moved for a mistrial and the trial court denied the motion. The jury found Solomon guilty of the sale of cocaine within one thousand feet of a school, and not guilty of possession of cocaine with intent to sell.
On appeal, Solomon contends that the chemist's remark shifted the burden of proof onto the defense to present evidence, and thus warranted a mistrial. Solomon further contends that the motion to sever should have been granted because the two counts were unrelated.
Appellee asserts that the chemist's remark, if error, was harmless. Appellee further asserts that the motion to sever was properly denied because the two counts occurred during one ongoing investigation, within a limited period of time, and in a limited geographical area. Hence, they were related.
Determination of whether substantial justice warrants granting a mistrial is within the discretion of the trial judge. Sireci v. State, 587 So.2d 450 (Fla. 1991); Dufour v. State, 495 So.2d 154 (Fla. 1986), cert. denied, 479 U.S. 1101, 107 S.Ct. 1332, 94 L.Ed.2d 183 (1987); Marek v. State, 492 So.2d 1055 (Fla. 1986).
A motion for mistrial should be granted only in circumstances where "the error committed was so prejudicial as to vitiate the entire trial." Duest v. State, 462 So.2d 446 (Fla. 1985); Cobb v. State, 376 So.2d 230 (Fla. 1979); Smelley v. State, 500 So.2d 318 (Fla. 1st DCA 1986). In this case, the trial judge acted well within her discretion in denying the motion for mistrial. We find no error in the chemist's remark.
Turning to Solomon's next issue, Rule 3.150(a), Florida Rules of Criminal Procedure, provides:

*791 (a) Joinder of Offenses. Two or more offenses which are triable in the same court may be charged in the same indictment or information in a separate count for each offense, when the offenses, whether felonies or misdemeanors or both, are based on the same act or transaction or on two or more connected acts or transactions.
Separate trials are required for similar offenses which are unrelated in terms of time or sequence. Paul v. State, 385 So.2d 1371 (Fla. 1980); Williams v. State, 409 So.2d 253 (Fla. 4th DCA), review denied, 417 So.2d 331 (Fla. 1982). However, where the crimes occurred during the course of an ongoing investigation, within a limited period of time and in a limited geographical area, and are clearly connected in an episodic sense, they may be tried together. See Williams v. State, 409 So.2d at 254.
In this case, the two alleged crimes occurred during the course of an ongoing investigation. The crimes also occurred within a limited five day period of time. Additionally, the two transactions were episodically connected because: (1) in both instances the apartment was used as a storage place for drugs; and, (2) Solomon's sale of drugs led the officer to obtain a search warrant, which in turn, led to the seizure of drugs.
Most importantly, the sale of drugs, and the seizure of drugs, emanated from the apartment area. Therefore, the foundation for both alleged crimes was the use of the apartment. The trial court properly denied the motion to sever.
Lastly, Solomon argues that the trial court improperly restricted his cross-examination of a police officer. Steinhorst v. State, 412 So.2d 332 (Fla. 1982), disposes of this argument.
Affirmed.
