The error 'plugged in not charging' can be caused due to various reasons such as faulty adapter or faulty charging board.
You may try below mentioned steps which may help in fixing the issue. Steps to perform Flea Power are:
Power off the system.
Disconnect any external peripherals (flash drives, printers, external hard drives) from the computer.
Disconnect the AC Adapter and remove the battery from it.
Press and hold the power button for 20 to 30 seconds to release the residual charge from the laptop.
Reconnect the battery and the AC Adapter.
Once the system is powered on and booted properly, re-seat the battery. Check if you still get the error or not.
Boot the system to BIOS, tapping the F2 key on the Dell logo screen when you power on the system.
Press F9 key to load BIOS defaults. Once done, press F10 key to save and exit. System will restart. Check if the error is still there.
Try and wiggle the AC Adapter cable and check if that makes a difference.
If it still doesn't work, parts replacement may be required.
Hope this helps.