+ Reply to Thread
Results 1 to 10 of 10

VBA Function pulling the last set of data from a filtered table

  1. #1
    Registered User
    Join Date
    03-14-2019
    Location
    Hereford
    MS-Off Ver
    Home and Business 2016
    Posts
    30

    VBA Function pulling the last set of data from a filtered table

    So i'm looking to be able to change my current function or have a new one that will allow me to be able to pick up what the last set of data is in the column of my table and would need it to change depending on what rows are filtered in/out.
    I can attatch an example of what my data looks like and i will post what my current function is below if anyone can help.

    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by jeffreybrown; 03-16-2019 at 11:30 AM. Reason: Please use code tags!

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,737

    Re: VBA Function pulling the last set of data from a filtered table

    If I correctly understand, you want to display data from last row in range L10:L16, right?
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Registered User
    Join Date
    03-14-2019
    Location
    Hereford
    MS-Off Ver
    Home and Business 2016
    Posts
    30

    Re: VBA Function pulling the last set of data from a filtered table

    Sorry that bit is there by mistake where i'm wanting it to pick up is from column F so if i added something in F:17 then it would change from 29.06 to whatever number i entered. Also if i filtered out row 16 i would need it to show row 15 so 52.24 if that makes it clearer

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,420

    Re: VBA Function pulling the last set of data from a filtered table

    See if the code in post #10 in the linked thread can be adapted to do what you want.
    https://www.excelforum.com/excel-pro...ed-column.html
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  5. #5
    Registered User
    Join Date
    03-14-2019
    Location
    Hereford
    MS-Off Ver
    Home and Business 2016
    Posts
    30

    Re: VBA Function pulling the last set of data from a filtered table

    Hi,I Believe thats sort of what i'm looking for however im unsure of how to get it to work in my sheet so that i can have a cell which returns the last visible row in a column as i'm quite new to VBA and everything im not sure how to do it

  6. #6
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: VBA Function pulling the last set of data from a filtered table

    would something like the below work for you?

    Please Login or Register  to view this content.
    note: filtering rows is itself a Volatile action so will trigger calcs on any dependent cells.

    re: linked prior post -- you cannot use SpecialCells in a UDF, directly.

  7. #7
    Registered User
    Join Date
    03-14-2019
    Location
    Hereford
    MS-Off Ver
    Home and Business 2016
    Posts
    30

    Re: VBA Function pulling the last set of data from a filtered table

    Sorry bit confused on how to get it to work with my scenario in the spreadsheet

  8. #8
    Forum Expert XLent's Avatar
    Join Date
    10-13-2010
    Location
    Northumberland, UK
    MS-Off Ver
    various
    Posts
    2,704

    Re: VBA Function pulling the last set of data from a filtered table

    simply put, overwrite your current code with that in post #6 - then test.

  9. #9
    Registered User
    Join Date
    03-14-2019
    Location
    Hereford
    MS-Off Ver
    Home and Business 2016
    Posts
    30

    Re: VBA Function pulling the last set of data from a filtered table

    Tried that and i'm just getting #NAME? back when i try to return the result

  10. #10
    Registered User
    Join Date
    03-14-2019
    Location
    Hereford
    MS-Off Ver
    Home and Business 2016
    Posts
    30

    Re: VBA Function pulling the last set of data from a filtered table

    My mistake i misstyped it haha, i believe that it is working now

+ 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] Function to populate filtered data into a table on seperate tabs
    By Jnehra in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-19-2017, 01:09 AM
  2. Function to calculate a total on filtered table
    By WouterM in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-01-2017, 05:35 AM
  3. Pulling filtered data in by tabs
    By almst791 in forum Excel General
    Replies: 2
    Last Post: 02-16-2017, 02:54 PM
  4. [SOLVED] Subtotal-like function for text on a filtered table
    By ericbinfet in forum Excel General
    Replies: 1
    Last Post: 01-09-2014, 04:27 PM
  5. Replies: 3
    Last Post: 11-04-2013, 07:50 PM
  6. [SOLVED] Pulling Aggregate Data from Table 1 to Automate Drawing Conclusions from Table 2
    By QuantumPolagnus in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-11-2013, 05:14 PM
  7. Pulling Data from Filtered Rows on One Tab into another
    By Joe Doucette in forum Excel Programming / VBA / Macros
    Replies: 24
    Last Post: 03-25-2012, 08:22 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