+ Reply to Thread
Results 1 to 4 of 4

Select some rows in a column assigned by a variable

Hybrid View

  1. #1
    Registered User
    Join Date
    10-07-2005
    Posts
    48

    Select some rows in a column assigned by a variable

    Hi all,

    I seem to be having trouble getting this simple bit of code working.

    Basically the code finds out which column the selector is in and selects rows 1 through 100 in that column.

    So if the selects is in column C rows 1-100 in column c are now highlighted.

    Dim columntest As Variant
    columntest = ActiveCell.column
    
    ???bit of code I cannot seem to write???

    Any help will be much appreciated.

    Cheers

  2. #2
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    columntest = ActiveCell.Column
    Range(Cells(1, columntest).Address, Cells(100, columntest).Address).Select
    Please Read Forum Rules Before Posting
    Wrap VBA code by selecting the code and clicking the # icon or Read This
    How To Cross Post politely

    Top Excel links for beginners to Experts

    If you are pleased with a member's answer then use the Scales icon to rate it
    If my reply has assisted or failed to assist you I welcome your Feedback.

  3. #3
    Registered User
    Join Date
    10-07-2005
    Posts
    48
    Ahh perfect thanks al ot.

  4. #4
    Valued Forum Contributor mudraker's Avatar
    Join Date
    11-10-2003
    Location
    Melbourne, Australia
    Posts
    3,983
    Glad to have been able solve your problem

+ Reply to Thread

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