Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Macro conversion from Lotus 1-2-3 to Excel (Sort Macro)

I'm trying to create a Macro in Excel to do what my Lotus macro would do for
me.

My Lotus macro did the following:

1) Goto to sheet A cell A1
2) It defined the data range to sort --- I had predefined data ranges which
were included in the Macro.
3) Selection of Primary key by moving over from cell A1 to the column that
contains the Primary key to sort by........ I would move 14 columns over.
4) Selection of Descending or Ascending and then execute

Can data ranges be defined within the Excel Macro?

I don't care if the macro does exactly what I was doing in Lotus so I'm open
to any suggestions.

I appreciate your help in advance!!!

Thanks
Carlos
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Macro conversion from Lotus 1-2-3 to Excel (Sort Macro)

Something like this is probably close...

sub Sort Stuff()
Sheets("A").Range("A1:Z100").sort Key1:=range("N1"), Order1:=xlAscending, _
Header:=xlYes
End sub
--
HTH...

Jim Thomlinson


"cgsteel" wrote:

I'm trying to create a Macro in Excel to do what my Lotus macro would do for
me.

My Lotus macro did the following:

1) Goto to sheet A cell A1
2) It defined the data range to sort --- I had predefined data ranges which
were included in the Macro.
3) Selection of Primary key by moving over from cell A1 to the column that
contains the Primary key to sort by........ I would move 14 columns over.
4) Selection of Descending or Ascending and then execute

Can data ranges be defined within the Excel Macro?

I don't care if the macro does exactly what I was doing in Lotus so I'm open
to any suggestions.

I appreciate your help in advance!!!

Thanks
Carlos

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Macro conversion from Lotus 1-2-3 to Excel (Sort Macro)

Jim,

Can the range be defined as a named range?

Example: You put Sheets("A").Range("A1:Z100").......can it be
Sheets("A").Range(data1)

Data1 = would be the range name that defines "A1:Z100".

If there is no Header, would the code be === Header:=xlNo ?

Thanks
Carlos

"Jim Thomlinson" wrote:

Something like this is probably close...

sub Sort Stuff()
Sheets("A").Range("A1:Z100").sort Key1:=range("N1"), Order1:=xlAscending, _
Header:=xlYes
End sub
--
HTH...

Jim Thomlinson


"cgsteel" wrote:

I'm trying to create a Macro in Excel to do what my Lotus macro would do for
me.

My Lotus macro did the following:

1) Goto to sheet A cell A1
2) It defined the data range to sort --- I had predefined data ranges which
were included in the Macro.
3) Selection of Primary key by moving over from cell A1 to the column that
contains the Primary key to sort by........ I would move 14 columns over.
4) Selection of Descending or Ascending and then execute

Can data ranges be defined within the Excel Macro?

I don't care if the macro does exactly what I was doing in Lotus so I'm open
to any suggestions.

I appreciate your help in advance!!!

Thanks
Carlos

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Macro conversion from Lotus 1-2-3 to Excel (Sort Macro)

You are exactly correct on both counts...
--
HTH...

Jim Thomlinson


"cgsteel" wrote:

Jim,

Can the range be defined as a named range?

Example: You put Sheets("A").Range("A1:Z100").......can it be
Sheets("A").Range(data1)

Data1 = would be the range name that defines "A1:Z100".

If there is no Header, would the code be === Header:=xlNo ?

Thanks
Carlos

"Jim Thomlinson" wrote:

Something like this is probably close...

sub Sort Stuff()
Sheets("A").Range("A1:Z100").sort Key1:=range("N1"), Order1:=xlAscending, _
Header:=xlYes
End sub
--
HTH...

Jim Thomlinson


"cgsteel" wrote:

I'm trying to create a Macro in Excel to do what my Lotus macro would do for
me.

My Lotus macro did the following:

1) Goto to sheet A cell A1
2) It defined the data range to sort --- I had predefined data ranges which
were included in the Macro.
3) Selection of Primary key by moving over from cell A1 to the column that
contains the Primary key to sort by........ I would move 14 columns over.
4) Selection of Descending or Ascending and then execute

Can data ranges be defined within the Excel Macro?

I don't care if the macro does exactly what I was doing in Lotus so I'm open
to any suggestions.

I appreciate your help in advance!!!

Thanks
Carlos

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default Macro conversion from Lotus 1-2-3 to Excel (Sort Macro)

Sorry Data1 should be in quotes...

Sheets("A").Range("Data1"). ...

--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

You are exactly correct on both counts...
--
HTH...

Jim Thomlinson


"cgsteel" wrote:

Jim,

Can the range be defined as a named range?

Example: You put Sheets("A").Range("A1:Z100").......can it be
Sheets("A").Range(data1)

Data1 = would be the range name that defines "A1:Z100".

If there is no Header, would the code be === Header:=xlNo ?

Thanks
Carlos

"Jim Thomlinson" wrote:

Something like this is probably close...

sub Sort Stuff()
Sheets("A").Range("A1:Z100").sort Key1:=range("N1"), Order1:=xlAscending, _
Header:=xlYes
End sub
--
HTH...

Jim Thomlinson


"cgsteel" wrote:

I'm trying to create a Macro in Excel to do what my Lotus macro would do for
me.

My Lotus macro did the following:

1) Goto to sheet A cell A1
2) It defined the data range to sort --- I had predefined data ranges which
were included in the Macro.
3) Selection of Primary key by moving over from cell A1 to the column that
contains the Primary key to sort by........ I would move 14 columns over.
4) Selection of Descending or Ascending and then execute

Can data ranges be defined within the Excel Macro?

I don't care if the macro does exactly what I was doing in Lotus so I'm open
to any suggestions.

I appreciate your help in advance!!!

Thanks
Carlos



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Macro conversion from Lotus 1-2-3 to Excel (Sort Macro)

Thanks Jim and Don!!!

I appreciate the help.
Carlos

"Don Guillett" wrote:

Sheets("A").Range("data1")

Guess should be OK
--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"cgsteel" wrote in message
...
Jim,

Can the range be defined as a named range?

Example: You put Sheets("A").Range("A1:Z100").......can it be
Sheets("A").Range(data1)

Data1 = would be the range name that defines "A1:Z100".

If there is no Header, would the code be === Header:=xlNo ?

Thanks
Carlos

"Jim Thomlinson" wrote:

Something like this is probably close...

sub Sort Stuff()
Sheets("A").Range("A1:Z100").sort Key1:=range("N1"), Order1:=xlAscending,
_
Header:=xlYes
End sub
--
HTH...

Jim Thomlinson


"cgsteel" wrote:

I'm trying to create a Macro in Excel to do what my Lotus macro would
do for
me.

My Lotus macro did the following:

1) Goto to sheet A cell A1
2) It defined the data range to sort --- I had predefined data ranges
which
were included in the Macro.
3) Selection of Primary key by moving over from cell A1 to the column
that
contains the Primary key to sort by........ I would move 14 columns
over.
4) Selection of Descending or Ascending and then execute

Can data ranges be defined within the Excel Macro?

I don't care if the macro does exactly what I was doing in Lotus so I'm
open
to any suggestions.

I appreciate your help in advance!!!

Thanks
Carlos



  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6
Default Macro conversion from Lotus 1-2-3 to Excel (Sort Macro)

Jim,

The code below sorts column "A" but if I wanted to add a level to the sort
that would sort column "B".

How would I do that?

Range("data1").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlNo

Thanks for your help.
Carlos

"Jim Thomlinson" wrote:

Sorry Data1 should be in quotes...

Sheets("A").Range("Data1"). ...

--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

You are exactly correct on both counts...
--
HTH...

Jim Thomlinson


"cgsteel" wrote:

Jim,

Can the range be defined as a named range?

Example: You put Sheets("A").Range("A1:Z100").......can it be
Sheets("A").Range(data1)

Data1 = would be the range name that defines "A1:Z100".

If there is no Header, would the code be === Header:=xlNo ?

Thanks
Carlos

"Jim Thomlinson" wrote:

Something like this is probably close...

sub Sort Stuff()
Sheets("A").Range("A1:Z100").sort Key1:=range("N1"), Order1:=xlAscending, _
Header:=xlYes
End sub
--
HTH...

Jim Thomlinson


"cgsteel" wrote:

I'm trying to create a Macro in Excel to do what my Lotus macro would do for
me.

My Lotus macro did the following:

1) Goto to sheet A cell A1
2) It defined the data range to sort --- I had predefined data ranges which
were included in the Macro.
3) Selection of Primary key by moving over from cell A1 to the column that
contains the Primary key to sort by........ I would move 14 columns over.
4) Selection of Descending or Ascending and then execute

Can data ranges be defined within the Excel Macro?

I don't care if the macro does exactly what I was doing in Lotus so I'm open
to any suggestions.

I appreciate your help in advance!!!

Thanks
Carlos

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default Macro conversion from Lotus 1-2-3 to Excel (Sort Macro)


Have you tried RECORDING a macro while you do it manually ?

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"cgsteel" wrote in message
...
Jim,

The code below sorts column "A" but if I wanted to add a level to the sort
that would sort column "B".

How would I do that?

Range("data1").Sort Key1:=Range("A1"), Order1:=xlAscending, Header:=xlNo

Thanks for your help.
Carlos

"Jim Thomlinson" wrote:

Sorry Data1 should be in quotes...

Sheets("A").Range("Data1"). ...

--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

You are exactly correct on both counts...
--
HTH...

Jim Thomlinson


"cgsteel" wrote:

Jim,

Can the range be defined as a named range?

Example: You put Sheets("A").Range("A1:Z100").......can it be
Sheets("A").Range(data1)

Data1 = would be the range name that defines "A1:Z100".

If there is no Header, would the code be === Header:=xlNo ?

Thanks
Carlos

"Jim Thomlinson" wrote:

Something like this is probably close...

sub Sort Stuff()
Sheets("A").Range("A1:Z100").sort Key1:=range("N1"),
Order1:=xlAscending, _
Header:=xlYes
End sub
--
HTH...

Jim Thomlinson


"cgsteel" wrote:

I'm trying to create a Macro in Excel to do what my Lotus macro
would do for
me.

My Lotus macro did the following:

1) Goto to sheet A cell A1
2) It defined the data range to sort --- I had predefined data
ranges which
were included in the Macro.
3) Selection of Primary key by moving over from cell A1 to the
column that
contains the Primary key to sort by........ I would move 14
columns over.
4) Selection of Descending or Ascending and then execute

Can data ranges be defined within the Excel Macro?

I don't care if the macro does exactly what I was doing in Lotus
so I'm open
to any suggestions.

I appreciate your help in advance!!!

Thanks
Carlos


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Lotus macro i need to convert to Excel Sammy Excel Discussion (Misc queries) 4 April 28th 10 09:31 PM
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
HOW DO I RUN A LOTUS MACRO IN EXCEL GM Excel Discussion (Misc queries) 0 November 14th 06 08:37 PM
Data table - Lotus 123 to Excel conversion cottage6 Excel Discussion (Misc queries) 0 November 8th 05 09:06 PM
translate lotus 1-2-3 macro into excel macro using excel 2000 krutledge0209 Excel Programming 1 November 2nd 04 05:50 PM


All times are GMT +1. The time now is 08:01 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"