+ Reply to Thread
Results 1 to 6 of 6

.Range selecting multiple columns

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    11-06-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2016
    Posts
    182

    .Range selecting multiple columns

    Hello -

    I'm using the below to select column A:

    
    With ActiveSheet
                  .Range("A" & (ActiveCell.Row)).Select
    How do I use this same structure to select Columns B & C ?

    I tried this but received an error:

    
    With ActiveSheet
                  .Range("B:C" & (ActiveCell.Row)).Select
    Thank you!

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: .Range selecting multiple columns

    With ActiveSheet
                  .columns("B:C").Select
    
    end with

  3. #3
    Forum Contributor
    Join Date
    11-06-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2016
    Posts
    182

    Re: .Range selecting multiple columns

    Hi -

    I tried that but it is selecting the whole column. So I tried this but also received another error:

    
    .Columns("B:C" & (ActiveCell.Row)).Select
    Thanks!

  4. #4
    Forum Guru Norie's Avatar
    Join Date
    02-02-2005
    Location
    Stirling, Scotland
    MS-Off Ver
    Microsoft Office 365
    Posts
    19,646

    Re: .Range selecting multiple columns

    Try this.
    
    With ActiveSheet
        Intersect(.Range("B:C"), .Rows(ActiveCell.Row)).Select
    End With
    If posting code please use code tags, see here.

  5. #5
    Forum Contributor
    Join Date
    11-06-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2016
    Posts
    182

    Re: .Range selecting multiple columns

    Hi Norie -

    I just saw this now but I tried this a couple minutes ago and it worked ok:
    .Range(("B" & (ActiveCell.Row)), ("C" & (ActiveCell.Row))).Select
    Thank you!

  6. #6
    Forum Contributor
    Join Date
    11-06-2012
    Location
    New Jersey, US
    MS-Off Ver
    Excel 2016
    Posts
    182

    Re: .Range selecting multiple columns

    Norie -

    Thank you for that - using yours I was able to select multiple!

+ 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. [SOLVED] Selecting range of columns with data only.
    By Christopherdj in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 01-06-2015, 01:40 AM
  2. [SOLVED] Excel VBA - Selecting Range of Data considering Multiple columns
    By Vinod Krishna.C in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-12-2014, 07:13 AM
  3. Selecting range with set columns but down to last populated row
    By cloudwalking in forum Excel Programming / VBA / Macros
    Replies: 19
    Last Post: 04-22-2013, 09:35 AM
  4. [SOLVED] Selecting a range except the last 2 columns
    By Excel432 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-23-2012, 10:09 AM
  5. Selecting multiple cells in multiple columns and rows to paste into a single row.
    By Cyberpawz in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-05-2012, 04:03 PM
  6. Selecting range using .range. But can you do same selection using .columns
    By welchs101 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 07-01-2011, 01:31 PM
  7. Selecting a range of columns
    By jomili in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-21-2011, 06:04 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