convert old macros to vertual basic

T

TJLV

I have workbooks with old macros recorded using relitive references. I run
some each month and new data is apended after the old data and then sorted.
When I record in excel 2003 I do not get the choice and all copy paste or
sorts have cell addresses. Is there an easy way to convert.

Eg.
=SORT(1,"R12C67",2,"R12C71",2,"R12C68",1)
converts to
Selection.sort Key1:=Range("bo12"), Order1:=xlDescending,
Key2:=Range("bs12") , Order2:=xlDescending, Key3:=Range("bp12"),
Order3:=xlAscending, Header :=xlGuess, OrderCustom:=1, MatchCase:=False,
Orientation:=xlTopToBottom , DataOption1:=xlSortNormal,
DataOption2:=xlSortNormal, DataOption3:= xlSortNormal


And ,

=FORMULA.GOTO("R200C3")
converts to
Range("C200").Select


BUT HOW DO I CONVERT;

=SORT(1,"RC",2,"RC[1]",1)

and,

=SELECT("R[1]C[-1]:R[16]C[1]")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

convert old macros 0
sort range 0
Sort by range 15
Sort error? 2
Macro Help 5
Macro Assist 2
Sort Errors 4
Writing a Sort Macro 4

Top