I need to perform an if loop. Now I know (part of) the theory and which variables I want. I just need a litlle help with the, you know, actual loop. I've outlined the situation below:
Per unique person it is possible to have several preferences (3 max). The different preferences are shown in column BO (row 2 and down). The columns BV, BZ & CD hold the Preference1 , 2 and 3.
What I'd like to have happen is: The data in column BO gets put in dim ToBeFunction. Then check if this equals the Preference in column BV. If so, write 1 (for pref1) to cell A1 on WB2. If not, does ToBeFunction == BZ -> write 2 to WB2, cellA1. If not, ToBeFunction==CD -> write 3 to WB2, cellA1. Else put 0 in WB2, cellA1
If it makes it any easier, the 0-3 can be replaced by the title headers of the corresponding columns.
I hope I've made my question clear. Please ask me to clarify if not.
Thanks in advance.
Aucun commentaire:
Enregistrer un commentaire