Spelling was not consistent until dictionaries made it standard in the 1800s. Until this time, spelling was quite fluid and tended to be according to the enumerator or registrar. Often this was done in a manner similar to phonetic spelling. I could not find the marriage for my Henry Fowler anywhere. I was beginning to think that perhaps the couple had had an irregular marriage. Then I decided to use a wildcard search for Henry and lo and behold I found him - listed as Henry FULLER. As soon as I saw the certificate, I realized why I hadn't found him sooner. Henry would have been asked his surname. In his thick Border brogue, Henry would have responded "Fooler" And that became written as FULLER.
It is not uncommon to find that your ancestor's surname changed from Clerke, to Clarke and then to Clark. All three sound the same in Scotland (clark) and yet the spelling has evolved over time. Knowing this will help to ensure you don't rule out people who might be your ancestor, but who you have ignored based on the (mis)spelling of the surname.
As a standard, surnames in Scotland weren't adopted by the common man until about the 1600s. Prior to that, people were known by patrynomics (Donald, son of John or Donald John's son), by physical trait (John the Red - Red John - for someone who might have been a redhead, by location (Thomas by the burn or Thomas Burn) or by occupation (David the miller or David Miller). Once surnames became common practice, many of these former descriptors were adopted as surnames. Others, particularly the Highlanders or border clans, took on the surname of the clan chief, family head or even the landowner for the estate they lived or worked on. For this reason, not everyone named Wallace, for example, is related to William Wallace. Nor is every Mc/MacDonald related to the clan chief.
People often have questions about the Mc vs Mac surnames. Some understand that one is Irish and the other is Scottish, while others understand that one is Catholic while the other is Protestant. In reality, they are interchangeable. Both Mc and Mac are the anglicized spelling of the Gaelic M' or M'hic. M'hic or M' for short, means "son of" in Gaelic. This has been transcribed over the centuries as Mc or Mac, depending on the transcriber and their understanding of how the prefix is spelled. So whether your ancestors were Mc or Mac, don't discount the other spelling in the event you might also be discounting your ancestor and his/her documents!