Question: is exactly an adverb or adjective?
Answer: Nevertheless, “exactly” is morphologically an adverb. It has that -ly ending, as distinct from its adjective counterpart “exact”. In English, where our morphology distinguishes adverbs from adjectives (unlike in German where they look the same), we use adjectives to modify simple nouns.