+ Reply to Thread
Results 1 to 5 of 5

Update Range based on Lookup Value

  1. #1
    Forum Contributor
    Join Date
    08-06-2018
    Location
    Virginia
    MS-Off Ver
    2019
    Posts
    342

    Update Range based on Lookup Value

    Hello:

    I need some assistance with populating a range (i.e., value lookup and calculation updates) based on a cell value.

    Please see attached XLSX that illustrates an example. I will summarize the requirements in bullet format.

    Example #1:
    - Cell B1 contains a drop-down menu with values between 1 and 30. In this case, value = 7 has been selected.
    - Now, starting in cell A4, I want to display the range of "Years" based on the value in B1.
    - Thus, given that B1 = 7, range A4:A10 lists values from 1 through 7.
    - Also, column B includes a (notional) calculation. Therefore, the formulas need to be added to B4:B10.
    - Lastly, I have "borders" (gray) that are currently applied manually to the cell range A4:B10. I'd like the application of borders to be automated, too.

    Example #2:
    - Now, let's say I change the value from "7" to, e.g., "15" in cell B1. The following should happen:
    1. In column A, I will show values from 1:15 in cell range A4:A18.
    2. In column B, the formulas will be applied showing a notional value = 22.5 in B18.
    3. Borders are now applied to the range A4:B18.

    Naturally, the same 3 steps (listed in example #2) will need to be applied for any value in the drop-down menu in B1.

    How can this be accomplished?

    Thank you,
    EEH
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,919

    Re: Update Range based on Lookup Value

    A4:

    =IF(ROWS(A$1:A1)<=$B$1,ROWS(A$1:A1),"")

    B4:

    =IF(A4="","",A4*3/2)

    Copy down.

    CF rule applied to work on non-blank cells.
    Attached Files Attached Files
    Last edited by AliGW; 12-31-2021 at 07:53 AM.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  3. #3
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,919

    Re: Update Range based on Lookup Value

    Any good?

  4. #4
    Forum Contributor
    Join Date
    08-06-2018
    Location
    Virginia
    MS-Off Ver
    2019
    Posts
    342

    Re: Update Range based on Lookup Value

    Hi AliGW:

    Sorry for the delayed response... for some reason, I didn't get an email that a contributor (you) responded to the post. Again, sorry for the delay.

    I downloaded your Excel file... your solution is PERFECT!!!! Thousand thanks for helping me out on this one.

    Since today is New Year's Eve, I wish you all the best for 2022. Many thanks for the help you offered me in the "old" year.

    Happy New Year,
    Tom

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,919

    Re: Update Range based on Lookup Value

    You're welcome, Tom. Happy New Year to you and yours, too.

+ 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. Update column in Shee1 based on Sheet2 (lookup) data
    By garret1 in forum Excel General
    Replies: 2
    Last Post: 05-19-2020, 01:04 PM
  2. Need Range to Update Dynamically Based on Cell Value
    By Modify_inc in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 05-29-2019, 03:59 PM
  3. [SOLVED] Update Range based on cell value
    By MichaelGG1581 in forum Excel General
    Replies: 3
    Last Post: 10-27-2015, 03:19 PM
  4. lookup value in master - loop through another worksheet and update value based upon rule
    By rickmeister in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 09-11-2014, 07:20 AM
  5. [SOLVED] Macro Update Based on Date Range
    By saban1974 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-18-2014, 12:05 AM
  6. Update cell based on date range
    By deversole in forum Excel General
    Replies: 3
    Last Post: 07-06-2005, 08:58 AM
  7. In Excel 2003 how do you get a table to update based on lookup cr.
    By cliveshelton in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 04-20-2005, 12:06 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