S
sort
How to swap Two Values in one Command.
xxx=value1
value1=value2
value2=xxx
xxx=value1
value1=value2
value2=xxx
How to swap Two Values in one Command.
xxx=value1
value1=value2
value2=xxx
Rick Rothstein said:If Value1 and Value2 are numeric values, then you can swap them without
the need for an intermediate variable...
Value1 = Value1 + Value2
Value2 = Value1 - Value2
Value1 = Value1 - Value2
If Value1 and Value2 are numeric values, then you can swap them without
the need for an intermediate variable...
Value1 = Value1 + Value2
Value2 = Value1 - Value2
Value1 = Value1 - Value2
--
Rick (MVP - Excel)
Dave Peterson said:I think you'll need that intermediate variable.
Rick Rothstein said:If Value1 and Value2 are numeric values, then you can swap them without
the need for an intermediate variable...
Value1 = Value1 + Value2
Value2 = Value1 - Value2
Value1 = Value1 - Value2