+ Reply to Thread
Results 1 to 4 of 4

Change a Range Based on another Cell

  1. #1
    Registered User
    Join Date
    03-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    40

    Change a Range Based on another Cell

    So I have a changing list of of data. I want to be able to change this formula dynamically..

    =COUNTBLANK(Data!J2:J2798)-V5

    I want the end of the range to change based on a value I have calculated in cell V3.

    Any thoughts?

    So the formula I would essentially want is - =CountBlank(Data!J2:J(V3))-V5

    Is this possible?

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,048

    Re: Change a Range Based on another Cell

    Ho and welcome to the forum

    you can do this 1 of 2 ways.

    change your formula to =COUNTBLANK(Data!J:J)-V5

    or use the indirect function inside your formula

    something like...
    =COUNTBLANK(INDIRECT("Data!J2:J"&V3))
    Last edited by FDibbins; 03-19-2013 at 12:53 PM.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,421

    Re: Change a Range Based on another Cell

    Yes, it is possible - try this:

    =COUNTBLANK(INDIRECT("'Data'!J2:J"&V3))-V5

    Hope this helps.

    Pete

  4. #4
    Registered User
    Join Date
    03-19-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    40

    Re: Change a Range Based on another Cell

    Thank you!

    Pete this totally worked! You're awesome.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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