+ Reply to Thread
Results 1 to 17 of 17

[SOLVED] Automatic macro to send changing values from one sheet to many other sheets.

  1. #1
    Forum Contributor
    Join Date
    06-27-2009
    Location
    montana,USA
    MS-Off Ver
    Excel 2007
    Posts
    190

    [SOLVED] Automatic macro to send changing values from one sheet to many other sheets.

    I have a 32 sheet workbook. Each day I change the date and cell E1 on sheet 1. When the date on sheet 2, 3, 4, 5.... match the date on sheet 1 then cell E1=MasterE1.
    What I would like to do is make E2=E1 on that date, so when I change the date and E1 on the master cell E2 will still show what E1"s date from the previous day.
    is this possible?

    1-1-11 Master(A1). E1=3.33 date cell A1
    sheet 1 E1 & E2 =3.33 date cell A1

    1-2-11 master. E1=3.40
    sheet 1 E1 will be blank E2=3.33
    sheet 2 E1 & E2 = 3.40
    and so on
    Last edited by simpson; 12-18-2011 at 01:14 AM.

  2. #2
    Forum Contributor
    Join Date
    06-27-2009
    Location
    montana,USA
    MS-Off Ver
    Excel 2007
    Posts
    190

    Re: cell value = another cell value on specific date

    If someone could just tell me that this is not possible....
    or
    I dont understand what your trying to do.....
    any help would be greatly appreciated.

  3. #3
    Forum Expert JapanDave's Avatar
    Join Date
    06-10-2008
    Location
    The grid, I got in!
    MS-Off Ver
    Excel 2010/13
    Posts
    1,696

    Re: cell value = another cell value on specific date

    Yes it is possible, from what you are saying. Can you post a dummy workbook with sensitive info taken out, to see exactly what you are after?
    Be fore warned, I regularly post drunk. So don't take offence (too much) to what I say.
    I am the real 'Napster'
    The Grid. A digital frontier. I tried to picture clusters of information as they moved through the computer. What did they look like? Ships? motorcycles? Were the circuits like freeways? I kept dreaming of a world I thought I'd never see. And then, one day...

    If you receive help please give thanks. Click the * in the bottom left hand corner.

    snb's VBA Help Files

  4. #4
    Forum Contributor
    Join Date
    06-27-2009
    Location
    montana,USA
    MS-Off Ver
    Excel 2007
    Posts
    190

    Re: cell value = another cell value on specific date

    here is a basic sample. Please let me know if there is anything or any ideas you have.
    thanks
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    06-27-2009
    Location
    montana,USA
    MS-Off Ver
    Excel 2007
    Posts
    190

    Re: cell value = another cell value on specific date

    anyone want to give this a shot before I give up?

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: cell value = another cell value on specific date

    Do you mean?

    =IF(A1=master!A1,master!E1,"") in each sheet.

    You can select all the sheets except for the master, by selecting sheet1, holding shift key, then selecting penultimate sheet. Then enter formula in your cell of choice, the right click any tab and select Ungroup sheets
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  7. #7
    Forum Contributor
    Join Date
    06-27-2009
    Location
    montana,USA
    MS-Off Ver
    Excel 2007
    Posts
    190

    Re: cell value = another cell value on specific date

    thanks for the reply NBVC, I am able to add the formula to all of the sheets. I'm having a hard time trying to explain what I need here i guess. the master sheet date and E1 are updated daily. per my sample and formula eadch sheet will display cell E1 when the dates match. however, on the days the date does not match i still need to be able to see what the E1 data was on that date. dates that have not occured yet will be blank.
    for example;
    master A1= 1/1/11 E1=3.30 so sheet 1 A1 = 1/1/11 and E1 will show 3.30
    day two (i change the date and E1 cell data)
    master A1= 1/2/11 E1=3.40 so sheet 1 A1 = 1/1/11 and E1 will show 3.30 sheet 2 E1 will show 3.40

    I really need to solve this problem. It is part of a huge spreadsheet that has no chance of going forward until i find some way to solve this.
    thanks in advance for any assistance you can provide.

  8. #8
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,169

    Re: cell value = another cell value on specific date

    Hi Simpson,

    I believe VBA can do what you are looking for. I don't quite understand the exact problem yet but here are some hints.
    If your master sheet is the last sheet on the right you can select it using "Worksheets(Worksheets.Count)"
    Your VBA code would cycle through each sheet using some code like:

    Please Login or Register  to view this content.
    The above code will run down your worksheets looking at each sheet and doing what you code it to do.
    See http://msdn.microsoft.com/en-us/libr...ffice.11).aspx or
    http://dmcritchie.mvps.org/excel/sheets.htm
    I hope this helps.
    Last edited by MarvinP; 12-15-2011 at 11:45 AM.

  9. #9
    Forum Contributor
    Join Date
    06-27-2009
    Location
    montana,USA
    MS-Off Ver
    Excel 2007
    Posts
    190

    Re: cell value = another cell value on specific date

    thanks again, but its not changing each sheet i'm after here.
    I'm trying to get E1 on each sheet to show the value from master E1 on specific dates.
    If you go to my sample workbook, look at sheet 1 E1 = 3.33. because master E1 = 3.33 and dates match.
    then, change the master date to 12/9/2011 and E1 to 3.40.
    sheet 2 now shows E1 = 3.40. thats good. but now sheet 1 cell E1 is blank. I need it to keep the 3.33 that was in there before the price/date change.

    sheet 1 cell E1 formula something like.....
    =masterE1 on (date from A1)
    Last edited by simpson; 12-15-2011 at 01:56 PM.

  10. #10
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: cell value = another cell value on specific date

    This macro will do what you want:
    Please Login or Register  to view this content.
    This macro goes into the "master" sheet module, right-click the sheet tab, select VIEW CODE, then paste in the code above. Save the workbook as a .xlsm to keep the macro active.

    Any changes on the Master sheet will trigger it. The first sheet found that has a date matching Master!A1 will receive the value from E1.
    Attached Files Attached Files
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  11. #11
    Forum Contributor
    Join Date
    06-27-2009
    Location
    montana,USA
    MS-Off Ver
    Excel 2007
    Posts
    190

    Re: cell value = another cell value on specific date

    is it possible to modify the code to save data from E1:E6 instead of just E1?

  12. #12
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: cell value = another cell value on specific date

    Quote Originally Posted by simpson View Post
    is it possible to modify the code to save data from E1:E6 instead of just E1?
    Like so:
    Please Login or Register  to view this content.

    Now you have two examples. Projects like this always tend to "balloon" in requirements, so read through both of these examples line by line and make sure you understand what each line of code is doing, these are simple macros and it's important so you can expand the macro later. Let's talk about any lines of code you want further explanation on if you don't see what they do, ok?

    Then, as we continue forward, be sure to post back showing the code changes you've tried that didn't work for your new requirements, sound good?

  13. #13
    Forum Contributor
    Join Date
    06-27-2009
    Location
    montana,USA
    MS-Off Ver
    Excel 2007
    Posts
    190

    Re: cell value = another cell value on specific date

    I had modified the code just as you did except i did not have the "value" after. Despite the simplicity of the sample this is part of a huge workbook. I cant wait to try it and i will try to keep you in the loop. Thanks so much for your help.

  14. #14
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: cell value = another cell value on specific date

    Glad it works for you!

    If that takes care of your need, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

  15. #15
    Forum Contributor
    Join Date
    06-27-2009
    Location
    montana,USA
    MS-Off Ver
    Excel 2007
    Posts
    190

    Re: cell value = another cell value on specific date

    honestly i dont think this thread is titled correctly either. I know that your code could be very helpful to others if they can find it. Have any better title ideas? I also have several other threads that i started trying to get this solution. I will link them to it maybe that will help.

  16. #16
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: [SOLVED] cell value = another cell value on specific date

    Maybe:

    Automatic Macro to send values from one sheet to many other sheets.

  17. #17
    Forum Contributor
    Join Date
    06-27-2009
    Location
    montana,USA
    MS-Off Ver
    Excel 2007
    Posts
    190

    Re: [SOLVED] Automatic macro to send changing values from one sheet to many other she

    thanks again. Its going to take me a few days to plug this in.
    If you really feel up for a challenge i have a Bin replenishment forecast workbook no ones ever been able to solve!

+ 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