+ Reply to Thread
Results 1 to 5 of 5

Relative cell reference selecting enitre row and entire column?

  1. #1
    Forum Contributor
    Join Date
    08-29-2017
    Location
    London England
    MS-Off Ver
    2016
    Posts
    194

    Relative cell reference selecting enitre row and entire column?

    Hi all,

    I literally started learning VBA 3 hrs ago, using one of the links from the sticky thread, but as I'm trying to be thorough I started to make a "dictionary" and I'm writing up the different selections that are possible.

    Attached a picture of them, as I couldn't insert the code here. I kept being blocked by the website fire wall (??)

    I have tested them 1 by 1 by just removing the ' from the start, and they all work so far as their description, but I can't do the code for the last one. Is it even possible or does excel get confused by it?

    Could someone send me a working code for: Select entire Row AND entire Column, 1 Row down AND 1 Column to the right from the reference cell A1 , and explain a bit, why

    ---ActiveCell.Offset(1, 1).Range("1:1, A:A").Select--- doesn't work (application defined or object defined error), and how does their code work?

    Thank you very much for the help!!
    Attached Images Attached Images
    Last edited by LIL2606; 01-27-2019 at 08:15 AM. Reason: Forgot the attachments

  2. #2
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Relative cell reference selecting enitre row and entire column?

    Because you have to put it in as 2 ranges not one joinded.. as col A and Row 1 are two different ranges not a range of sequential cells

    ActiveCell.Offset(1, 1).Range("1:1", "A:A")

  3. #3
    Forum Contributor
    Join Date
    08-29-2017
    Location
    London England
    MS-Off Ver
    2016
    Posts
    194

    Re: Relative cell reference selecting enitre row and entire column?

    Thank you for your response Rogel Jongman, but that brings back the same error, and I'm not sure the 2 different ranges is a problem as ---Range("6:6,G:G").Select--- works perfectly when its absolute.

  4. #4
    Forum Expert Roel Jongman's Avatar
    Join Date
    03-28-2015
    Location
    Netherlands
    MS-Off Ver
    Office 365
    Posts
    1,483

    Re: Relative cell reference selecting enitre row and entire column?

    A my mistake.. got lost in the 30 examaples a bit..
    so did you I think..

    1:1 is a row you cannot use entirecolumn on a row range that is an invalid statement.

  5. #5
    Forum Contributor
    Join Date
    08-29-2017
    Location
    London England
    MS-Off Ver
    2016
    Posts
    194

    Re: Relative cell reference selecting enitre row and entire column?

    I got rid of the entirerow and entirecolumn things and all the other ones still work like a charm (on picture)

    only the last one I can't get to work...

    Capture4.JPG

+ 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. cell reference, relative rows, absolute column
    By Lconner in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-27-2015, 08:50 PM
  2. Replies: 1
    Last Post: 10-02-2014, 01:37 PM
  3. Replies: 2
    Last Post: 03-19-2014, 04:32 AM
  4. VBA- Relative Cell Reference taking one value and pasting to all cells in a column
    By mrblue1123 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-20-2013, 09:49 AM
  5. [SOLVED] Selecting an entire column using a reference defined in another cell
    By Pippin66 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-18-2012, 10:03 PM
  6. Selecting a range with relative reference
    By HBF in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-12-2008, 04:45 PM
  7. Insert a formula with relative cell reference based on a number in a column
    By Dcritelli in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-16-2007, 05:54 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