View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Susan Susan is offline
external usenet poster
 
Posts: 1,117
Default Excel macro to sort columns, one row at a time

vincent - i'm working on it!
:)
just might take me a little bit (no guru here).
didn't want you to think nobody was answering! i'm a relative newbie
myself so it takes me a while to write code..............
maybe some guru will take pity on you & answer you while i'm working on
it!
ha ha
susan


vincent wrote:
Hi folks

I use macros using the record feature of Excel but dont know vis basic.
I think i need some kind of simple for-loop to systematically go row
by row and sort my columns in ascending order.

It would look something like this.

For Row = 1 to 2000, Step 1
Sort Row Code (see below cutout of actual code for doing just one
row)
Next


I dont know how to write this code to make it increment row by row.
Any help is greatly appreciated!

Vincent

Range("DW2:FR2").Select

Selection.Sort Key1:=Range("DW2"), Order1:=xlAscending,
Header:=xlGuess, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlLeftToRight, _
DataOption1:=xlSortNormal