+ Reply to Thread
Results 1 to 11 of 11

Find last filled row and generate cell reference for use in other formulae

  1. #1
    Registered User
    Join Date
    09-18-2008
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    66

    Find last filled row and generate cell reference for use in other formulae

    Morning all,

    I have a spreadsheet with data that will be constantly updated.
    I am hoping it is possible to generate a cell reference based on the value of the last cell.
    So far what I have is :
    In Cell C1 :
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    - Will find the number of games in the data set, from A10 to the end of the data (column is filled with dates).
    In Cell C2 :
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    - Will show the number of the last row used.
    Now, in E5 I have :
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    - Where 'STREAK' is a macro function searching for a run of zeros in the data set. The 'H400' is a nominal number that will change according to the updated data set.
    What I am trying to do is have :
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    , or,
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    so the value of the range is updated according to what is in C2.
    There is one more formula that would require the same 'tickle' :
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    whereby the reference to 'H23' would be updated according to C2
    Currently all of the above attempts produce a 'VALUE' error.
    Many searches of the mighty google have proved fruitless trying to work this one out.

    Cheers for your time
    Martin
    Last edited by Lungfish; 07-16-2017 at 08:22 PM. Reason: solved

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

    Re: Find last filled row and generate cell reference for use in other formulae

    You are over complicating this.

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Formula: copy to clipboard
    Please Login or Register  to view this content.



    Attach a sample workbook. Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.
    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.

  3. #3
    Registered User
    Join Date
    09-18-2008
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    66

    Re: Find last filled row and generate cell reference for use in other formulae

    Hi, Thanks for the reply.
    Attached is an example sheet outlining the details of what I am (currently) trying to achieve.

    The 'GAMES TODAY' value in C1 will be used in other sheets in the workbook.
    The 'LAST ROW' value in C2 will be used to generate the cell reference to be used in H4 & H5
    The 'CURRENT STREAK' & 'MAX LOSING STREAK' values in H4 & H5 will need to calculate based on the 'LASTROW' value generated in C2.

    The formulae in H10:S400 will remain 'as is' and the calcs in H4 & H5 will ignore the excess data (0's) according to the 'LASTROW' cell reference generated by C2.

    Hope this helps.

    Cheers
    Martin
    Attached Files Attached Files
    Last edited by Lungfish; 07-01-2017 at 07:59 PM. Reason: upload updated sheet

  4. #4
    Registered User
    Join Date
    09-18-2008
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    66

    Re: Find last filled row and generate cell reference for use in other formulae

    Just a gentle bump!

  5. #5
    Registered User
    Join Date
    09-18-2008
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    66

    Re: Find last filled row and generate cell reference for use in other formulae

    Still trying to find a way to get the last row and then use that in my other formulae.

    Can this only be done with VBA?

    Cheers
    Martin

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

    Re: Find last filled row and generate cell reference for use in other formulae

    I entered that in c2 and the result was 30 as requested.

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    09-18-2008
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    66

    Re: Find last filled row and generate cell reference for use in other formulae

    That bit I understand.

    I don't understand how I can update/modify/structure the other formula to reflect the 'last row' found by '=MATCH....'
    i.e:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    How do I get the 'H400'to use the value for last row instead of 'H400"?

    or,
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    How do I get the 'H23' to reflect the value found for last row?
    Cheers
    Martin

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

    Re: Find last filled row and generate cell reference for use in other formulae

    Not sure that I understand the rational behind either of the formulas however here is my attempt at a solution.
    For the formula in I5:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    It appears to me that the formula in I4 is attempting the following: If there is a 1 in the desired portion of the column then count the number of zeros and if there isn't a 1 count the number of zeros anyway. At any rate to count the zeros only in the range between row 10 and the row indicated in cell C2 of any particular column use the formula:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    I would suggest that you explain to us what you are trying to accomplish with each formula and manually input the expected values for the cells in rows 4 and 5.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  9. #9
    Registered User
    Join Date
    09-18-2008
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    66

    Re: Find last filled row and generate cell reference for use in other formulae

    Morning,

    Thanks for the reply.

    I've modified the example sheet to reflect what I am trying to achieve.

    Basically, The 'STREAK' finds the maximum amount of #1's (in a row) in the complete data set. Depending on the sheet, that could be 350 - 15,000 rows.
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    does the trick nicely.

    The "CURRENT STREAK" (COUNTIF...) is trying to find the run of #0's, from the top of the data set to the first #1 it encounters. Again, depending on the data set, this could be from 0 to 15,000 (or more).

    I've updated the example sheet with notations and a more 'real-life' data set.

    Thanks for your time.

    Cheers
    Martin
    Attached Files Attached Files

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

    Re: Find last filled row and generate cell reference for use in other formulae

    Try this formula as applied in cells I2 and across:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions.
    Attached Files Attached Files

  11. #11
    Registered User
    Join Date
    09-18-2008
    Location
    Australia
    MS-Off Ver
    2010
    Posts
    66

    Re: Find last filled row and generate cell reference for use in other formulae

    Morning,

    Your awesomeness is appreciated!
    All under control and working as desired.

    Cheers
    Martin

+ 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. Most Recent Filled Cell = Reference
    By kcsbp7 in forum Excel General
    Replies: 4
    Last Post: 07-18-2014, 04:15 PM
  2. [SOLVED] How to find last filled in cell in a column?
    By Cat Chowdy in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 05-05-2014, 02:54 AM
  3. [SOLVED] Highlight cells between 1 reference cell and last filled cell on Row
    By dleeds in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-06-2013, 05:10 PM
  4. Can we use formulae as reference in Offset formulae
    By vinayashwitha in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-25-2013, 12:13 AM
  5. Find Last Filled Cell In Column And Calculate
    By sratkins in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-06-2011, 01:50 PM
  6. Find Last Filled Cell, Negate it, determine another cell and subtotal a column
    By kerl in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-30-2007, 06:50 PM
  7. [SOLVED] Can you have fixed cell reference when dragging/copying formulae?
    By ducksfolly in forum Excel General
    Replies: 4
    Last Post: 12-20-2005, 07:25 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