Do you have to change both the egr valve and solenoid on a 1999 ford expedition?
What is the problem your having?
Need more info...
Below you will find some info._____________________________________ EGR Valve
4.2L, 4.6L, 5.4L and 6.8L Engines
1. Disconnect the negative battery cable.
2. Remove the vacuum hose from the EGR valve.
3. On the 4.6L engine, remove the nut and brake booster bracket.
4. On the 5.4L engine, remove the DPFE sensor retaining nuts and place the sensor to the side to allow access to the EGR tube.
5. Disconnect the EGR valve-to-exhaust manifold tube from the EGR valve.
6. Remove the EGR valve mounting bolts, then separate the valve from the intake manifold.
7. Remove and discard the old EGR valve gasket, and clean the gasket mating surfaces on the valve and the intake manifold.
8. Install the EGR valve, along with a new gasket, on the manifold, then install and tighten the mounting bolts.
9. Connect the EGR valve-to-exhaust manifold tube to the valve, then tighten the tube nut to 25-35 lbs. (34-47 Nm).
10. Connect the vacuum hose to the EGR valve.
11. On the 5.7L engine, install the DPFE sensor.
12. On the 4.6L engine install the brake booster bracket and the retaining nut.
13. Connect the negative battery cable.
A solenoid valve is an electromechanical valve for use with liquid or gas controlled by running or stopping an electric current through a solenoid, which is a coil of wire, thus changing the state of the valve. The operation of a solenoid valve is similar to that of a light switch, but typically controls the flow of air or water, whereas a light switch typically controls the flow of electricity. Solenoid valves may have two or more ports: in the case of a two-port valve the flow is switched on or off; in the case of a three-port valve, the outflow is switched between the two outlet ports. Multiple solenoid valves can be placed together on a manifold.
Solenoid valves are the most frequently used control elements in fluidics. Their tasks are to shut off, release, dose, distribute or mix fluids. They are found in many application areas. Solenoids offer fast and safe switching, high reliability, long service life, good medium compatibility of the materials used, low control power and compact design.
Besides the plunger-type actuator which is used most frequently, pivoted-armature actuators and rocker actuators are also used.
 Working principle
A solenoid valve has two main parts: the solenoid and the valve. The solenoid converts electrical energy into mechanical energy which, in turn, opens or closes the valve mechanically. A Direct Acting valve has only a small flow circuit, shown within section E of this diagram (this section is mentioned below as a pilot valve). This Diaphragm Piloted Valve multiplies this small flow by using it to control the flow through a much larger orifice.
Solenoid valves may use metal seals or rubber seals, and may also have electrical interfaces to allow for easy control. A spring may be used to hold the valve opened or closed while the valve is not activated.
A- Input side
C- Pressure chamber
D- Pressure relief conduit
F- Output side
The diagram to the right shows the design of a basic valve. If we look at the top figure we can see the valve in its closed state. The water under pressure enters at A. B is an elastic diaphragm and above it is a weak spring pushing it down. The function of this spring is irrelevant for now as the valve would stay closed even without it. The diaphragm has a pinhole through its center which allows a very small amount of water to flow through it. This water fills the cavity C on the other side of the diaphragm so that pressure is equal on both sides of the diaphragm. While the pressure is the same on both sides of the diaphragm, the force is greater on the upper side which forces the valve shut against the incoming pressure. By looking at the figure we can see the surface being acted upon is greater on the upper side which results in greater force. On the upper side the pressure is acting on the entire surface of the diaphragm while on the lower side it is only acting on the incoming pipe. This results in the valve being securely shut to any flow and, the greater the input pressure, the greater the shutting force will be.
Now let us turn our attention to the small conduit D. Until now it was blocked by a pin which is the armature of the solenoid E and which is pushed down by a spring. If we now activate the solenoid drawing the pin upwards via magnetic force from the solenoid current, the water in chamber C will flow through this conduit D to the output side of the valve. The pressure in chamber C will drop and the incoming pressure will lift the diaphragm thus opening the main valve. Water now flows directly from A to F.
When the solenoid is again deactivated and the conduit D is closed again, the spring needs very little force to push the diaphragm down again and the main valve closes. In practice there is often no separate spring, the elastomer diaphragm is moulded so that it functions as its own spring, preferring to be in the closed shape.
From this explanation it can be seen that this type of valve relies on a differential of pressure between input and output as the pressure at the input must always be greater than the pressure at the output for it to work. Should the pressure at the output, for any reason, rise above that of the input then the valve would open regardless of the state of the solenoid and pilot valve.
In some solenoid valves the solenoid acts directly on the main valve. Others use a small, complete solenoid valve, known as a pilot, to actuate a larger valve. While the second type is actually a solenoid valve combined with a pneumatically actuated valve, they are sold and packaged as a single unit referred to as a solenoid valve. Piloted valves require much less power to control, but they are noticeably slower. Piloted solenoids usually need full power at all times to open and stay open, where a direct acting solenoid may only need full power for a short period of time to open it, and only low power to hold it.
 Common uses
A common use for 2 way solenoid valves is in central heating. The solenoid valves are controlled by an electrical signal from the thermostat to regulate the flow of heated water to the heating elements within the occupied space. Such valves are particularly useful when multiple heating zones are fed by a single heat source. Commercially available solenoid valves for this purpose are often referred to as zone valves.
Another common use for solenoid valves is in automatic irrigation sprinkler systems. See also Controller (irrigation).
In the paintball industry solenoid valves are usually referred to simply as "solenoids." They are commonly used to control a larger valve used to control the propellant (usually compressed air or CO2). In the industry, "solenoid" may also refer to an electromechanical solenoid commonly used to actuate a sear.
Solenoid valves are also used for air control, to control fluid flow, and in pharmacology experiments, especially for patch-clamp, which can control the application of agonist or antagonist.