Middle English in this sense had ani-gates "in any way, somehow" (c. 1400), also on anikinnes wise "in any way or manner" (c. 1200), and Late Old English had on enige wisan "in any wise, in any manner." As a prepositional phrase, in any way is from late 14c.
Entries linking to anyway
"one, a or an, some," Old English ænig (adjective, pronoun) "any, anyone," literally "one-y," from Proto-Germanic *ainagas (source also of Old Saxon enig, Old Norse einigr, Old Frisian enich, Dutch enig, German einig), from PIE root *oi-no- "one, unique." The -y may have diminutive force here.
As a noun, late 12c.; as an adverb, "in any degree," c. 1400. Emphatic form any old______ (British variant: any bloody ______) is recorded from 1896. At any rate is recorded from 1847. Among the large family of compounds beginning with any-, anykyn "any kind" (c. 1300) did not survive, and Anywhen (1831) is rarely used, but OED calls it "common in Southern [English] dialects."
[A]ani refers to single entities, amounts, etc., occurring at random or chosen at random, as being convenient, suitable, to one's liking, etc. It is frequently emphatic and generalizing, having the force of 'any whatever, any at all' and 'any and every'. It is common in questions, conditional clauses, and negative statements, but not in affirmative statements (where som is used instead). [The Middle English Compendium]
Old English weg "road, path; course of travel; room, space, freedom of movement;" also, figuratively, "course of life" especially, in plural, "habits of life" as regards moral, ethical, or spiritual choices, from Proto-Germanic *wega- "course of travel, way" (source also of Old Saxon, Dutch weg, Old Norse vegr, Old Frisian wei, Old High German weg, German Weg, Gothic wigs "way"), from PIE root *wegh- "to go, move, transport in a vehicle."
From c. 1300 as "manner in which something occurs." Adverbial constructions attested since Middle English include this way "in this direction," that way "in that direction," both from late 15c.; out of the way "remote" (c. 1300). In the way "so placed as to impede" is from 1560s.
From the "course of life" sense comes way of life (c. 1600), get (or have) one's way (1590s), have it (one's) way (1709). From the "course of travel" sense comes the figurative go separate ways (1837); one way or (the) other (1550s); have it both ways (1847); and the figurative sense of come a long way (1922).
Adverbial phrase all the way "completely, to conclusion" is by 1915; sexual sense implied by 1924. Make way is from c. 1200. Ways and means "resources at a person's disposal" is attested from early 15c. (with mean (n.)). Way out "means of exit" is from 1926. Encouragement phrase way to go is short for that's the way to go.
anyway, there is another factor to consider
get it done anyway you can