+ Reply to Thread
Results 1 to 3 of 3

Finding the last row with data in it, among multiple columns

  1. #1
    Forum Contributor
    Join Date
    07-30-2014
    Location
    USA
    MS-Off Ver
    Version 14.4.3, Mac 2011
    Posts
    145

    Finding the last row with data in it, among multiple columns

    Hey guys,
    I'm trying to figure out the best way to do this.
    I know how to find the last row used for a single column so I was attempting to find that value for all 13 columns, and then see which one was the largest and use that one.
    In another language this code wouldn't be too difficult but I don't understand the syntax of VBA yet or know if there are better ways to do what i'm attempting.

    Help is much appreciated, below is the scratch work of my code.
    Thanks a ton
    Red

    Please Login or Register  to view this content.

  2. #2
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,610

    Re: Finding the last row with data in it, among multiple columns

    Try this:
    Please Login or Register  to view this content.
    The line:
    WorksheetFunction.Max(last(0), last(1), last(2), last(3), last(4), last(5), last(6), last(7), last(8), last(9), last(10), last(11), last(12), last(13))

    must be:
    RowCount = WorksheetFunction.Max(last(0), last(1), last(2), last(3), last(4), last(5), last(6), last(7), last(8), last(9), last(10), last(11), last(12), last(13))

    I.e., you must assign the max value to a variable.
    Ben Van Johnson

  3. #3
    Forum Expert
    Join Date
    12-14-2012
    Location
    London England
    MS-Off Ver
    MS 365 Office Suite.
    Posts
    8,448

    Re: Finding the last row with data in it, among multiple columns

    Please Login or Register  to view this content.
    My General Rules if you want my help. Not aimed at any person in particular:

    1. Please Make Requests not demands, none of us get paid here.

    2. Check back on your post regularly. I will not return to a post after 4 days.
    If it is not important to you then it definitely is not important to me.

+ 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. Finding Unique List of Data pulled from multiple columns (Plus sum)
    By emdoak in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-09-2015, 10:45 AM
  2. Replies: 5
    Last Post: 10-01-2013, 02:34 PM
  3. Problem Finding Data in Multiple Columns Using Match Function
    By joshc22 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 12-12-2012, 04:26 PM
  4. [SOLVED] Finding multiple matches of a single input across multiple rows and columns
    By gingerdog in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 08-07-2012, 02:54 PM
  5. [SOLVED] Finding common data in multiple columns and rows in Excel
    By sparham in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 02-12-2005, 01:06 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