+ Reply to Thread
Results 1 to 9 of 9

Vba select a enitre row but exclude a column

  1. #1
    Forum Contributor
    Join Date
    05-05-2020
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    100

    Vba select a enitre row but exclude a column

    Hello,

    How can I select the last row before blank rows but exclude a column, for example column A?

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

    Re: Vba select a enitre row but exclude a column

    Assuming there is data in column A try this.
    Please Login or Register  to view this content.
    If posting code please use code tags, see here.

  3. #3
    Forum Contributor
    Join Date
    05-05-2020
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    100

    Re: Vba select a enitre row but exclude a column

    the problem is, the column A contains a function, which numbers each row as the cell next to it is filled and this code selects the last row that has the function.

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

    Re: Vba select a enitre row but exclude a column

    You can choose another column to get the last row, one that doesn't have formulas copied down below the data.

    The below code uses B but you can change that to whatever column is appropriate.
    Please Login or Register  to view this content.

  5. #5
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,709

    Re: Vba select a enitre row but exclude a column

    Or maybe something like this ...
    Please Login or Register  to view this content.
    If I was able to help, you can thank me by clicking the * Add Reputation under my user name

  6. #6
    Forum Contributor
    Join Date
    05-05-2020
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    100

    Re: Vba select a enitre row but exclude a column

    after changing the function in column A it keeps selecting the empty row after the row that is filled.

    this function is in column A

    Please Login or Register  to view this content.

  7. #7
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,709

    Re: Vba select a enitre row but exclude a column

    @(T_T), if you're referring to my code & you want last row with data & not blank, change the below in my code

    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    05-05-2020
    Location
    Germany
    MS-Off Ver
    2013
    Posts
    100

    Re: Vba select a enitre row but exclude a column

    thank you both

  9. #9
    Forum Expert nankw83's Avatar
    Join Date
    08-31-2015
    Location
    Kuwait
    MS-Off Ver
    365
    Posts
    1,709

    Re: Vba select a enitre row but exclude a column

    Glad to help & thanks for the added Rep

+ 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] Relative cell reference selecting enitre row and entire column?
    By LIL2606 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-27-2019, 10:04 AM
  2. VBA code to search / select - how to exclude inactive items?
    By jstn in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-21-2018, 03:19 PM
  3. How to select cell but exclude first 2 row?
    By jp16 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-14-2018, 09:50 PM
  4. [SOLVED] change to exclude select entries
    By mikerules in forum Excel General
    Replies: 5
    Last Post: 06-02-2014, 04:00 PM
  5. conditional formatting a formula for enitre column
    By tvonbehren in forum Excel General
    Replies: 4
    Last Post: 11-07-2011, 03:51 PM
  6. Locking references in an enitre worksheet
    By jeb225 in forum Excel General
    Replies: 0
    Last Post: 10-27-2009, 11:53 AM
  7. [SOLVED] multiplying an enitre column.
    By Robert in forum Excel General
    Replies: 2
    Last Post: 08-19-2005, 10:05 AM

Tags for this Thread

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