I need a macro which, when vDoor1 = 1, selects one random data depending on its name. I have no knowledge of VBS, and I haven't found any guides either... I could imagine it being something like this: IF(variable=1) THEN SELECT if(Rand<=0.5 AND Name=*text) THEN Field[Data] ELSE Field[Data2]