This example teaches you how to swap two values in Excel VBA. You will often need this structure in more complicated programs as we will see later.
Situation:
Two values on your worksheet.
Place a command button on your worksheet and add the following code lines:
Result:
.