He was elected to the National Assembly as a candidate of PML-N from Constituency NA-65 (Sargodha-II) in 2013 Pakistani general election.[5][2][6][7] He received 102,871 votes and defeated Ghias Mela.[8] During his tenure as Member of the National Assembly, he served as the Federal Parliamentary Secretary for Information and Broadcasting.[9]
Following the election of Shahid Khaqan Abbasi as Prime Minister of Pakistan in August 2017, he was inducted into the federal cabinet of Abbasi[10][11] and was made Minister of State, however he was not assigned any ministry.[12] In October 2017, he was made Minister of State for Parliamentary Affairs.[13] Upon the dissolution of the National Assembly on the expiration of its term on 31 May 2018, Ranjha ceased to hold the office as Minister of State for Parliamentary Affairs.[14]
^"Detail Information". www.pildat.org. PILDAT. Archived from the original on 19 April 2014. Retrieved 26 April 2017.{{cite web}}: CS1 maint: bot: original URL status unknown (link)