+ Reply to Thread
Results 1 to 14 of 14

Updating Excel Data from another spreadsheet with a single cell reference

  1. #1
    Registered User
    Join Date
    09-28-2023
    Location
    Belfast
    MS-Off Ver
    Office 365
    Posts
    11

    Updating Excel Data from another spreadsheet with a single cell reference

    Hi All,

    Today I am trying to update an excel spreadsheet with updating data from another spreadsheet. What makes this a little tricky is the spreadsheet with the updating data is from a formula from a single cell (as shown by the red square). This value of 1.01% for example, updates weekly according to the formula and I was wondering if the updated values can be added into the cells (on another spreadsheet as shown by the blue square on the other screenshot).

    Overall, this means that I would be able to recieve updated data (from the red square) which inputs into the Weekly Maintenance DT Actual %. I was thinking about an If Statement but I would assume that it has to be a little more advanced as the changing value makes a little tough.

    Kind Regards,
    Joel
    Attached Images Attached Images
    Last edited by JArchy; 04-25-2024 at 08:51 AM.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,830

    Re: Updating Excel Data from another spreadsheet

    It is hard to work with a picture. It would be easier to help and test possible solutions if you could attach a copy of your file. Explain in detail what you want to do referring to specific cells, rows, columns and sheets using a few examples from your data (de-sensitized if necessary). See the yellow banner at the top of this page for instructions to attach a file.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    09-28-2023
    Location
    Belfast
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Updating Excel Data from another spreadsheet

    Cell L15(Workbook 1); Cell C175 (Workbook 2)

    Hi All,

    I have included the spreadsheets this time.

    So in workbook 1, on Cell L15 we have a calculated % DT (Downtime) Due to Engineering column which is calculated using FILTER and SUM functions.

    It would be great if I could get this figure pulled through weekly into Column C, starting with Cell C175 being this current week. When the number in Cell D15 is refreshed weekly I would like it to add the new number over into the Column C.


    Thanks for the Help,
    Joel
    Attached Files Attached Files
    Last edited by JArchy; 04-25-2024 at 10:28 AM.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,830

    Re: Updating Excel Data from another spreadsheet with a single cell reference

    Automatically copying a cell to another cell is normally done with a Worksheet_Change macro. The problem here is that a Worksheet_Change event is automatically triggered only when a cell is changed manually. Cell D15 is not entered manually but instead is the result of a formula. A Worksheet_Calculate event is triggered automatically when a formula in a cell is calculated. The problem with this method is that the event is triggered by any formula in the worksheet, not just the formula in D15. Assuming that the values in the range A28:C315 are entered manually, the only way that I can think of to possibly make this work is to track the manual changes in that range for any manual data entry because it seems that the formulae in D8:D14 reference the values in A28:C315 which determine the value in D15. If this is the case, then a Worksheet_Change macro should work because it will track manual entries. You could give this a try to see if it works for you. First make sure that both workbooks are open. Then copy and paste this macro into the worksheet code module by doing the following: right click the tab name for your "Main DT Report" sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. After entering or changing any value in A28:C315, press the ENTER key. Check column C in Workbook 2 to see if D15 was copied to C175. Change the workbook name and sheet name (in red) to suit your needs.
    Please Login or Register  to view this content.
    Last edited by Mumps1; 04-25-2024 at 10:08 AM.

  5. #5
    Registered User
    Join Date
    09-28-2023
    Location
    Belfast
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Updating Excel Data from another spreadsheet with a single cell reference

    Hi,

    Thanks for the response. I wrote D15 instead of L15 but I couldn't seem to get your code to copy over the value. I wish there was some way to fix the value copied in the workbook 2 so when a change is introduced I could use an IF statement to see if the value in C175 is changed from the value in L15 and if so add a new value.

    Something like this = IF(C174='[Workbook 1.xlsx]Main DT Report'!$L$15,"",'[Workbook 1.xlsx]Main DT Report'!$L$15)

    However this would only work if the formula result could be changed into a fixed number.

    It would be great if you have any advice on this or an adaption of your code to make it work.

    Kind Regards,
    Joel

  6. #6
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,830

    Re: Updating Excel Data from another spreadsheet with a single cell reference

    I don't think any event code will work because all the referenced cells are the result of a formula. None is entered manually. The only other approach I can think of is to run a macro manually when you want to update column C. You could add a button on the Main DT Report sheet and assign this macro to it.
    Please Login or Register  to view this content.

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,830

    Re: Updating Excel Data from another spreadsheet with a single cell reference

    As an afterthought, did you try changing D15 to L15 in the code? Also, did you place the macro in the worksheet code module as I described in Post #4?
    Please Login or Register  to view this content.

  8. #8
    Forum Contributor
    Join Date
    10-02-2012
    Location
    UK
    MS-Off Ver
    Office 365
    Posts
    254

    Re: Updating Excel Data from another spreadsheet with a single cell reference

    Wrong thread

  9. #9
    Registered User
    Join Date
    09-28-2023
    Location
    Belfast
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Updating Excel Data from another spreadsheet with a single cell reference

    Hi, PrizeGotti,

    That is what I'm trying to do but when you reference the value at L15 it will change from week to week. I was hoping to get a value at the end of the week from the L15 value and then have it update into the column B. For example, this week the %DT Due to Engineering was 1.01% and this is week 16 (B175), this means that next week this value will be different and the new value will need to appear in C176 while keeping the previous value.

  10. #10
    Registered User
    Join Date
    09-28-2023
    Location
    Belfast
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Updating Excel Data from another spreadsheet with a single cell reference

    Hi Mumps1.

    Your code worked and created a value rather than referenced code. I was wondering could this be applied to the next columns in C176-186 (Worksheet 2) when week 17-27 are reached as this value at L15 (Worksheet 1) will change next week and I will need it to appear in C176 (Worksheet 2) when we reach the end of next week.

  11. #11
    Registered User
    Join Date
    09-28-2023
    Location
    Belfast
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Updating Excel Data from another spreadsheet with a single cell reference

    Hi All,

    I just wanted to post again so that the post does not go cold and was wondering if anyone could provide additional support.

  12. #12
    Registered User
    Join Date
    09-28-2023
    Location
    Belfast
    MS-Off Ver
    Office 365
    Posts
    11

    Updating Excel Data from another spreadsheet with a single cell reference

    Hi All,

    I have included the spreadsheets below.

    So in workbook 1, on Cell L15 we have a calculated % DT (Downtime) Due to Engineering column which is calculated using FILTER and SUM functions.

    It would be great if I could get this figure pulled through weekly into Column C of Workbook 2, starting with Cell C175 being this current week (Week 16). When the number in Cell D15 is refreshed weekly I would like it to add the new number over into the Column C (Week 17, 18....)


    Thanks for the Help,
    Joel
    Attached Files Attached Files

  13. #13
    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
    81,247

    Re: Updating Excel Data from another spreadsheet with a single cell reference

    Your threads have been merged and I'm moving this to the Excel General section for visibility.
    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.

  14. #14
    Registered User
    Join Date
    09-28-2023
    Location
    Belfast
    MS-Off Ver
    Office 365
    Posts
    11

    Re: Updating Excel Data from another spreadsheet with a single cell reference

    Thanks for the help, AliGW.

    Kind Regards,
    Joel

+ 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. Updating spreadsheet with another spreadsheet's data
    By ZachD972 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-28-2023, 12:45 PM
  2. Replies: 3
    Last Post: 02-20-2019, 04:44 PM
  3. updating a spreadsheet with new data from a separate spreadsheet
    By mikep374 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 02-09-2014, 01:46 PM
  4. [SOLVED] Question regarding updating data on one spreadsheet from data on another spreadsheet
    By ianpwilliams in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-17-2013, 02:50 AM
  5. Replies: 5
    Last Post: 05-09-2011, 04:53 PM
  6. Updating Spreadsheet Data??
    By worldavia in forum Excel General
    Replies: 2
    Last Post: 02-19-2007, 01:45 PM
  7. Automatically updating data from another excel spreadsheet
    By Gary c in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-20-2005, 10:45 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