I worked on a Dell a while back that did similar stuff because of a psu fault, the light on the psu still came on but it did not charge the battery. Eventually because of the low battery the computer would start to power up and then shut down due to low power.
The Dell psu lead has a center pin that delivers a diagnostic voltage to the computer. Sometimes the pin becomes disconnected or breaks off entirely. No voltage or incorrect voltage on the center pin will prevent the battery charging. If you have a volt meter you can check the power output (inner to outer of connector cylinder 19.5V) and then the diagnostic voltage (whichever part of the connector cylinder that was -ve to the center pin, I think that it was about 3 to 5V). Google is your friend here.
Sometimes a rebuild of the connector (wire cutters, heatshrink, hotmelt glue and a soldering iron) will restore your existing power supply to fully functional status. If you decide to replace the PSU, a second hand genuine one will give more mileage than a brand new pattern one.