+ Reply to Thread
Results 1 to 4 of 4

Formula needed to update list based on a cell ref

  1. #1
    Forum Contributor
    Join Date
    01-14-2014
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    109

    Formula needed to update list based on a cell ref

    Good day

    Please refer to the attached.
    I have a calander where appointments are updated on the "Data" sheet.
    I need to populate the info (as listed "Events, etc." ) to the "Full" sheet based on the date selected.
    There is already a Macro to create the "selectedCell" which if you click a date will appear in B4.
    I tried a VLOOKUP but this will only give me one event based on the date, I need at least 13 events to pull accross based on the formula. I tried "Match" and "Index" but not an expert with these formulas
    Please assist
    Attached Files Attached Files

  2. #2
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Formula needed to update list based on a cell ref

    I actually just wrote some code very similar to this last night.

    I removed the =[selected cells] Worksheet Change Event to AA4 and simply made it change the actual cell value.

    This then calls another piece of code which builds an Advanced Filter on the Filter Tab, then grabs each piece of data and manually fits it into each of the merged cell ranges.

    I added some names on your Data tab so you can see the Full tab update as you select 2/9, 2/10, 2/11.

    Autofill Calendar.xlsm
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  3. #3
    Forum Contributor
    Join Date
    01-14-2014
    Location
    South Africa
    MS-Off Ver
    Excel 2010
    Posts
    109

    Re: Formula needed to update list based on a cell ref

    Hi Daffodill

    This is totally another way of doing it from what I had in mind, ....... but let me just say this is impressive!!!
    Is there any way that you can explain the code for me. I believe in learning especially things that works as this clearly does!! If I understand the code I could find more way of using it.

    ALMOST FORGOT!!! Thank you!! this is a great piece of work and code!!!!

  4. #4
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Formula needed to update list based on a cell ref

    Here's the post I wrote last night, which was very similar. It even has an explanation of the code.

    https://www.excelforum.com/showthread.php?t=987158

    Your code was modified slightly to target horizontal merged cells instead.

    I used 3 variables as starting positions for the paste-to range: n = 5, p = 21, w = 35 since these are the rows we begin pasting to.

    Each column's data is then pasted to AA5:BO5, AA21:BO21, AA35:BO35. At the end of the first round of pasting, it adds 1 to each variable, and then cycles through again this time pasting to AA6:BO6, AA22:BO22, AA36:BO36 and so on. Other than that, all I did was change the paste from Columns and Paste to Columns and nearly everything is indentical.

    You can look at your code by hitting Alt+F11 and going to Module 1.

    The worksheet_change event is occuring on your Full worksheet, right below the original.

    I'm quite the novice at code myself, so it took about 3 hours to write what I did for last night's post. I've used Advanced Filtering in the past, so the first chunk of code came straight out of my head, as did turning off the ScreenUpdating and Clearing cell contents. The other 3 blocks came from an article I found online on how to paste to a merged cell. I just tinkered with the code, spliced in what I thought I needed, and then debugged it until it worked the way I needed.

    There's a good chance an expert could do the same work in less lines (and certainly in less time), in much the same way a novice Excel user might use =A1+B1+C1+D1+E1 and a more experienced person might write =SUM(A1:E1). But mine works all the same, and it's good starting point.

+ 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 formula in cells based on list selection
    By XLNB in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-05-2014, 03:39 PM
  2. Update formula in cells based on list selection
    By XLNB in forum Excel General
    Replies: 1
    Last Post: 01-05-2014, 03:17 PM
  3. Update a cell based on selection in dropdown list.
    By ladykickbox in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 10-26-2012, 07:45 AM
  4. [SOLVED] Update respective cell value based on Multiple Drop Down list selections
    By nileshpatil in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-16-2012, 08:43 AM
  5. Update a validation list based on value of another cell
    By JDM11808 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 03-05-2009, 07:53 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