Thread: Swapping Values
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Jim Thomlinson[_3_] Jim Thomlinson[_3_] is offline
external usenet poster
 
Posts: 983
Default Swapping Values

Declare range objects and set them

dim rngHigh as range
dim rngLow as range
dim rngTemp as range

set rngHigh = ...
set rngLow = ...
set rngTemp = ...

"Don Lloyd" wrote:

Hi,

I'm working on a customised sort routine which involves swapping values
within a table.
Uing a temporary variable, single cells are not a problem, but what's the
best way to work with multiple cells. The code is in R1C1 notation.

Example
Swap Row 10, Columns 5 to 8
With Row 15, Columns 5 to 8

What I would like to be able to do is to complete the swap using one
temporary variable.

Regards,
Don Lloyd