Results 1 to 3 of 3

How to select/unselect range based on variables

Threaded View

  1. #1
    Registered User
    Join Date
    12-10-2009
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    3

    How to select/unselect range based on variables

    Hi, I'm very new to programming...

    Right now I'm writing Excel macros that will sort data in accending order.

    From the macro recording I have:
    Range("A1:T19").Select
    Range("T19").Activate
    Selection.sort Key1:=Range("T19"), Order1:=xlAscending, Header:=xlGuess, _
    OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
    DataOption1:=xlSortNormal
    However, I want to unselect the rows if the value for first cell of that row (Cells(x,1)) is empty. So that only the row where Range("Ax")<>Empty are selected.

    I tried using variables and if... then commands but none worked. Any ideas? Thanks in advance!! =)
    Last edited by kirba; 12-10-2009 at 11:50 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1