In general, any time it is necessary to reverse
a sequence of numbers from A to B (where A and B
are both in the range of 0 to 255), you can use
SUBLW A+B
which will work even if the sum A+B is greater than 255.
If you have two numbers that you want to switch between, such as 15 and 47 then a simple way to do it is to calculate 62 (47+15) - N.
EG
62 - 47 = 15
62 - 15 = 47
It's a quirk of how the SUBLW works that makes this possible. The instruction subtracts W from a literal and so in the above example, W will flip between 47 and 15 every time the instruction SUBLW 62 is executed.