Have you looked at Andrew Ramsay's possible siblings?
Jannet Ramsay baptised 30 December 1703 FORGAN, FIFE, SCOTLAND
George Ramsay baptised 14 November 1705 FORGAN, FIFE, SCOTLAND
Margaret Ramsay baptised 30 May 1708 FORGAN, FIFE, SCOTLAND
Isobel Ramsay baptised 16 July 1710 FORGAN, FIFE, SCOTLAND
Barbara Ramsay baptised 10 August 1712 FORGAN, FIFE, SCOTLAND
Andrew Ramsay baptised 18 September 1715 FORGAN, FIFE, SCOTLAND
Unfortunate that the marriages for Forgan were recorded from 1703 in the IGI when John married before that.