has a rough idle when you put the car in gear or at a light on 1994 Volvo 960

2 days and the spark plugs were replaced and didn't help the problem

Asked by for the 1994 Volvo 960
It is the ignition coil. Each cylinder has its own ignition coil. The coils will frequently fail. When a coil fails, that particular spark plug will not fire. This causes the engine to run rough. The coil sits on top of the spark plug. To check which coil is bad: a) start the car b) unplug the wire going to one of the ignition coils. This should cause the engine to run worse. If this does not affect how the engine is running... this is your bad coil. c) if it did cause the engine to run worse, reconnect that ignition coil and proceed to the next coil and repeat. d) repeat this until you disconnect a wire to an ignition coil and it does not impact how the car is running. You can purchase a new coil for about $50.00 from Volvo.
2 more answers , 1 more comment
It could be many things, a vacuum leak, dirty fuel injectors, an idle speed control problem, far too many things to guess at without being able to experience the problem first hand and carry out some basic diagnostic tests.
The number 5 spark plug is not firing. There is a short or a problem with the module.
check the coil for #5 cylinder, these have been known to fail. Try swapping it with another cylinder and see if the misfire moves to the other cylinder.
Also check the intake manifold for leaks.