There is an entry in the 1841 census in Edinburgh for an Andrew Douglas aged 15.Address 7 Ponton Street
Others in household
George 41
Thomas 22
George 20
Frederick 13
Hugh 10
James 8
John 3
Possible entry in 1871 census for Frederick gives place of birth as Corstorphine (which is on the west side of Edinburgh). Mention this because when I first looked at the 1871 census for Andrew my initial thoughts were Rutherglen and,being an Edinburgh boy, thinking outside the box, Corstorphine.
William