However, if there are a total of 50 entities in the nearby cells, and I have them all loop over each other and shoot, the game begins to lag.
50 entities looping over 50 nearby other entities = 50 * 50 = 2500 decisions who to shoot each update. This is assuming that each entitiy will shoot each and every update loop, which is of course not the case I assume. These numbers are extremely low, and it does not make sense at all that this should cause lag.
Without seeing any code I can just say: do some profiling to find out why this is so slow.