Vanity is a word that we are familiar with in another form. It appears early in the Bible as the name given to the second person born on earth, Abel. Adam named him "Vanity." In its simplest form, it signifies a breath, which is comparitively nothing. That is what it means—nothing.
A breath has a short existence. We breath in and breath out, and then we take another one. It lasts for just a second. When we carry out the application of this word, temporariness begins to come to the fore because a person's breath is very temporary and quickly replaced by another and another and another. Vanity describes something that is nothing, impermanent, temporary. But that hardly exhausts its meaning.
This phrase "vanity of vanities" is written in the Hebrewsuperlative form. It is similar in its application as "holy of holies." Another one is the "Song of Songs," sometimes called Canticles or Song of Solomon. Modern translators tend to translate vanity of vanities as "meaningless." A single breath has no meaning to it. Some have gone so far as to translate it "absurd." In a way, this fits the context of Ecclesiastes best because absurd means "irrational," an affront to reason, something that does not fit the order and purpose we seek from life.
That is what Solomon means: Life is absurd. Why do we live? All of our life, we spend working, playing, relating, and at its end, what does a person have to show for what he has done? It is absurd, irrational, meaningless.
John W. Ritenbaugh
Ecclesiastes and the Feast of Tabernacles (Part 1)