I don't know if there is a direct way to do that at once, but you could do the generation of the second random number inside a loop that breaks when it is different of the previous one.
I mean something like (getting your code as example):
variable_1 = rand.Next(1,14)
variable_2 = rand.Next(1,14)
} while (variable_2 == variable_1)
But this solution can only be taken into consideration if the number of variables to check before accepting the new one is not big, so the conditions don't get too much. Using a recursive function that checks the previous ones and recalls itself if not matching would be another possibility.
Problem with that is: the bigger the number of variables you want to create, the bigger time it gets to find a correct value for the next.
how many variables are you speaking about? And the range for the random numbers? Must all variables have "unique" value?
If there are many variables and all of them must have a unique value you could do another thing, like creating an array to hold the values from 1 to range_limit, sorting them randomally and getting them from there.