The commonest causes of sharp stabbing pain under the right rib cage going into the back are:
Gall bladder infection and / or stone.
Right kidney stone with impaction.
Simple clinical actual examination, ultrasonography and relevant blood and urine tests help a lot to get a diagnosis.
The treatment will be dependent on the cause as for every cause the treatment and further investigations are different.
I hope this answers your query.
These Q&A’s are for educational purposes and should not be relied upon as a substitute for medical advice you may receive from your physician. If you have a medical emergency, please call 911. These answers do not constitute or initiate a patient/doctor relationship.