Tolkien is quite clear on a number of occasions that the last of the Eldar (i.e the Elves of the West who undertook the Great Journey) left Middle-earth in the years following the defeat of Sauron, but sometimes this may have been many years after, and he's not always clear in exactly how long.
For example, in the prologue to the Lord of the Rings we read the following:
It is said that Celeborn went to dwell there after the departure of Galadriel; but there is no record of the day when at last he sought the Grey Havens, and with him went the last living memory of the Elder Days in Middle-earth.
And in Of the Rings of Power and the Third Age (published in the Silmarillion) we read:
In that time the last of the Noldor set sail from the Havens and left Middle-earth for ever. And latest of all the Keepers of the Three Rings rode to the Sea, and Master Elrond took there the ship that Círdan had made ready... it passed into the Ancient West, and an end was come for the Eldar of story and of song.
There was however another group of Elves known as the Avari, who refused the Great Journey, and many of the Mirkwood and Lórien Elves are members of this group. It's not told whether or not these went West or remained in Middle-earth following Sauron's defeat, but one would expect that they would have little motivation for going West since they refused the summons of the Valar in the first place.
The primarily linguistic essay Quendi and Eldar, published in History of Middle-earth 11, sheds some additional light on relationships between the Eldar and the Avari, noting in particular of the Tatyarin Avari (i.e those from the second clan, from which also came the Noldor) that:
They were actually unfriendly to the Noldor, and jealous of their more exalted kin, whom they accused of arrogance. This ill-feeling descended in part from the bitterness of the Debate before the March of the Eldar began...
But also:
For in contrast the Lindarin elements in the western Avari were friendly to the Eldar, and willing to learn from them; and so close was the feeling of kinship between the remnants of the Sindar, the Nandor, and the Lindarin Avari, that later in Eriador and the Vale of Anduin they often became merged together.
So in the end the matter of whether these Elves stayed or left is left open.