"Whatever" and "Whoever" with vad and vem
Just as you learned with hur ... än (no matter how), you can combine question words with the particle än to create concessive clauses meaning "whatever" or "whoever".
Use vad (what) or vem (who) followed by the subject, the particle än, and the verb. Because this is a subordinate clause, än acts as a sentence adverb and is placed directly before the verb.
Word order: Vad / Vem + subject + än + verb
| Whatever we do, the robot works. | Vad vi än gör, arbetar roboten. |
| Whoever the robot meets, it is tireless. | Vem roboten än möter, är den outtröttlig. |
Notice that if your entire sentence starts with this subordinate clause, the main clause that follows must obey the V2 (verb-second) rule and start with its verb (e.g., arbetar roboten, är den).
"Whatever [noun]" with vilken / vilket / vilka
To say "whatever code" or "whichever command," use vilken, vilket, or vilka, depending on the gender and number of the noun. The noun attaches directly to the question word.
Word order: Vilken / Vilket / Vilka + noun + subject + än + verb
For en-words, use vilken:
| Whatever code we write, the system has no human feeling. | Vilken kod vi än skriver, har systemet ingen mänsklig känsla. |
For ett-words, use vilket:
| Whatever command you give, the system has already calculated the risk. | Vilket kommando du än ger, har systemet redan beräknat risken. |
For plural nouns (both en- and ett-words), use vilka:
| Whatever obstacles the mechanical robot finds, it is programmed to continue. | Vilka hinder den mekaniska roboten än hittar, är den programmerad att fortsätta. |