+ Reply to Thread
Results 1 to 5 of 5

Autoselect data on entire column?

  1. #1
    Registered User
    Join Date
    01-19-2014
    Location
    Amsterdam
    MS-Off Ver
    Excel 2007
    Posts
    3

    Autoselect data on entire column?

    Hi, first post so be gentle;-)

    I'm new to VBA Macro's.
    I have a macro with three different calls to re-arrange our worksheet, rename path and Sort a column on poperty 'number'.
    "Sort a column" does not work, not sure what the reason is, but i suspect the datarange. Its hardcoded everytime, whereas i want it to select the entire column as it differs daily, set it to number property and sort ascending.

    This is the routine (which doesnt work):

    Please Login or Register  to view this content.
    The row on which it stops, is this:
    Please Login or Register  to view this content.

    Any expert here who can show me a good tutorial about this, or knows the answer?


    Cheers.

  2. #2
    Forum Expert
    Join Date
    10-09-2012
    Location
    Dallas, Texas
    MS-Off Ver
    MO 2010 & 2013
    Posts
    3,049

    Re: Autoselect data on entire column?

    Post a sample data set
    Please ensure you mark your thread as Solved once it is. Click here to see how.
    If a post helps, please don't forget to add to our reputation by clicking the star icon in the bottom left-hand corner of a post.

  3. #3
    Registered User
    Join Date
    01-19-2014
    Location
    Amsterdam
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Autoselect data on entire column?

    Hi, thanks for the reply.

    I have attached a a small portion of the sheet as a xlsx file.
    In the regular routine i get the "Error 9", something like "...subscript of of range...".

    Also, in column A the data should be numeric so i can compare with other datasheets with vlookup and such methods. I see the property is set as Number, but i can still "convert to number", which puzzles me.

    Thanks again.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-24-2013
    Location
    Iran
    MS-Off Ver
    Excel 2003
    Posts
    22

    Re: Autoselect data on entire column?

    hi dear bro.
    try this code.

    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    01-19-2014
    Location
    Amsterdam
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Autoselect data on entire column?

    Almost perfect ;-)
    The sorting goes flawless, but how do i set the fields to "numeric" instead of standard?

    I tried adding
    Please Login or Register  to view this content.
    after
    Please Login or Register  to view this content.
    No luck.

    Thanks.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Offset+counta to autoselect data range for charting purposes
    By siroco79 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 12-17-2013, 04:50 AM
  2. Changing data in an entire column?
    By WARRIORBP in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-09-2007, 03:27 PM
  3. Replies: 3
    Last Post: 08-22-2006, 04:20 PM
  4. [SOLVED] Autoselect data using Macros
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-02-2006, 01:35 PM
  5. Changing entire column data
    By Collegestudent05 in forum Excel General
    Replies: 1
    Last Post: 03-09-2005, 05:06 PM

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