+ Reply to Thread
Results 1 to 5 of 5

select cells around activecell

  1. #1
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    select cells around activecell

    Hi,

    how do i select the cells around an activecell including the activecell using a macro?

    2 cells up from the activecell
    9 cells to the left from the activecell
    2 cells to the right from the activecell
    16 cells down from the activecell

    For example activecell is J11 so the cells selected would be from A9 to L27

  2. #2
    Forum Expert Keebellah's Avatar
    Join Date
    01-12-2014
    Location
    The Netherlands
    MS-Off Ver
    Office 2021 (Windows)
    Posts
    7,905

    Re: select cells around activecell

    I just typed it in, not tested, but this would be the idea

    Please Login or Register  to view this content.
    ---
    Hans
    "IT" Always crosses your path!
    May the (vba) code be with you... if it isn't; start debugging!
    If you like my answer, Click the * below to say thank-you

  3. #3
    Registered User
    Join Date
    02-09-2014
    Location
    India
    MS-Off Ver
    Excel 2007
    Posts
    60

    Re: select cells around activecell

    Please see if the below code works:

    Please Login or Register  to view this content.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: select cells around activecell

    Or

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  5. #5
    Valued Forum Contributor
    Join Date
    12-01-2011
    Location
    Philippines
    MS-Off Ver
    Excel 2016
    Posts
    949

    Re: select cells around activecell

    all of your code works, thanks guys!

+ 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] ActiveCell Last Column Select
    By HerryMarkowitz in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-30-2013, 07:44 AM
  2. How to select activecell
    By excel_vb in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 05-02-2010, 03:17 AM
  3. select activecell and following
    By Armitage2k in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-07-2009, 08:07 AM
  4. select a range of cells relative to ActiveCell?
    By kevnin in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-02-2008, 03:43 PM
  5. ActiveCell.Next.Select not working
    By Mike Connell in forum Excel General
    Replies: 0
    Last Post: 05-09-2007, 01:48 PM
  6. ActiveCell.Row in Range().Select?
    By thebluerider in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-19-2006, 06:45 AM
  7. [SOLVED] select range next to activecell
    By lookin in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 03-29-2006, 03:10 PM
  8. Select Activecell in Range
    By PraxisPete in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-01-2005, 09:05 AM

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