I have a sharp pain in the left side of my abdomen just below the rib cage. It’s been going on for the last 5 months especially when I cough?

Exam needed. This prolonged symptom warrants an evaluation by a physician. Special attention to be paid to the spleen, splenic flexure of the colon, base of the left lung, but also pancreas and gastric area. I recommend a gastroenterologist to perform the initial examination. Appropriate tests will be ordered.