In vain has 3 different meanings across 1 category:
Adverb
Unsuccessful, failed.
to no avail
"he looked for her in vain"
"the city fathers tried vainly to find a solution"
Without success or a result; ending in failure.