+ Reply to Thread
Results 1 to 47 of 47

Macro To Pull Last week worth of Data out of a Worksheet

  1. #1
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Macro To Pull Last week worth of Data out of a Worksheet

    I have a sample work book with 2 worksheets, one is titled All Data", the other called "Last Week"

    Is it possible to write a macro, to pull data between a "given" time frame? I would like to build a macro to say, ok if this date is between this day and this day pull this data into a seperate worksheet, with this formatting. Any ideas of How I would approach this, or other suggestions?

    I was thinking maybe I could use a userform, to input the dates and to press submit, then have the macro create the sheet with the data that is called...but that is just a thought, not sure if that is possible or not.


    Update, Ok I have built a userform, but right now there is no codes inputted. Not sure how I connect the cells to the calendar option yet either...but I have attached the amended file...


    Ok I have built some code into it, but it still needs some work, check amended file, for updated information...
    Last edited by 00Able; 12-08-2010 at 09:51 PM. Reason: Updated Progress

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Check this out, done in XL'07
    Click J1 to reset the ComboBoxes, select the start date and the end date then click the button
    Attached Files Attached Files
    Last edited by davesexcel; 12-01-2010 at 10:17 PM.

  3. #3
    Forum Expert
    Join Date
    01-15-2007
    Location
    Brisbane, Australia
    MS-Off Ver
    2007
    Posts
    6,591

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi

    I've attached a file that will hopefully get you going. Open your userform1, then select the from date textbox. This will open a calendar, so select your date then press the commandbutton. Same for the to date. Then press submit, followed by close.

    HTH

    rylo
    Attached Files Attached Files

  4. #4
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Quote Originally Posted by rylo View Post

    I've attached a file that will hopefully get you going.
    I have opened the file but...It states "Unable to find Object, Not available on this Machine", I can see inside the vb, but it will not let me see the calendar that you added, I am using a Mac, but running BootCamp with Windows 7 64bit, and Excel 2010...so I do not know what the problem would be... but I do appreciate you assistance
    Last edited by 00Able; 12-02-2010 at 06:04 PM.

  5. #5
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Quote Originally Posted by davesexcel View Post
    Check this out, done in XL'07
    Click J1 to reset the ComboBoxes, select the start date and the end date then click the button
    Dave, Once again you have came up with a solution to what I request, not sure quite how I will try to disect this to be able to use in my "real life" instances though.

    Because the Macro is "prebuilt" into an existing sheet, in this workbook, would I be able to go to a different workbook, and perform this same task? Let me restate that clearer... I have several huge files with lots of data recorded daily concerning differnent aspects of business each on seperate worksheets, some in different workbooks. But I want to compile one workbook, that has about 30 worksheets with different information but only showing the last week of data, so its not so HUGE... , without a bunch of copy paste copy paste, blah blah blah. As this is a task, that I have to complete every Monday. How can I use what you show to do this?

    Still not sure if that is clear enough for interpretation...so lets say I want to have a workbook with pages that mirror "Last Week" that you have done...but I dont want to go through all 30 worksheets and input the same date over and over again...as I want a composition for the same dates consistant in the entire workbook. Is it possible to have a "Front Page" and input the date, and have the worksheets reference the dates shown on that page.
    And...is it possible to pull the data from other workbooks that are on saved on my system, but are closed, into this "Weekly" workbook?

    If so any thoughts, on how to do this.


    I am open to anyones thoughts, concerns, ideas, suggetions, please feel free to comment.

  6. #6
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,481

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    You may have to edit the msgbox, it is reversed.
    If you have additional queries to this thread. you will have to add additional information or examples, do you want to loop through worksheets and filterr them so the results are on one sheet?
    Last edited by davesexcel; 12-02-2010 at 01:56 AM.

  7. #7
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Ok, Here is a little example, that I set up...using a similiar format as Dave illustrated in the thread above.
    I am not sure how I can attach the calendar option to assist in Date Selection (it is already imported into the attachement in the VB program.)

    But if you look at the "Front Page" you will see what I want it to do. I want to be able to input a range of dates (again using the calendar option -all the code is in the vb already), and for it to automatically pull the data between those dates from the sheets labeled "Down Time Log (1st Shift)" and "Down Time Log (2nd Shift)" in an identical format and perfably sorted by Date/shift...so that I see both see Dec 1 first shift data, then Dec 1 second shift data, Dec 2 First Shift Data, Dec 2 Second Shift Data, in that order on the front page if the range is 12/1/ 2010 - 12/2/2010

    See attachment
    Also, I have installed a user form called, frmDateControl, as an alternative to the activex controls...
    Last edited by 00Able; 12-18-2010 at 12:17 PM.

  8. #8
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    In the attached, I've added a new UserForm2 (I didn't want to have to wade through your code that creates the Calendar so I added my own). There is code behind UserForm2 that you can review.

    I've also added Module1 that does all the grunt work for the Buttons on "FRONT PAGE"

    There is no error checking; should you decide to use this, you'll need to add that.

    Play with it and see if it does as you require.
    Attached Files Attached Files
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  9. #9
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Unhappy Re: Macro To Pull Last week worth of Data out of a Worksheet

    Quote Originally Posted by jaslake View Post
    In the attached, I've added a new UserForm2 (I didn't want to have to wade through your code that creates the Calendar so I added my own). There is code behind UserForm2 that you can review.
    I can open the file but it will not let me use the calendar, I am having the same error that I did with rylos attachment earlier in this thread...

    I have opened the file but...It states "Unable to find Object, Not available on this Machine", I can see inside the vb, but it will not let me see the calendar that you added, I am using a Mac, but running BootCamp with Windows 7 64bit, and Excel 2010...so I do not know what the problem would be... but I do appreciate you assistance

    I don't know what else I can do to be able to view this, does anyone else have any ideas?

  10. #10
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    I'm running this on a Mac with Fusion but am using XP and Excel 2000 and/or 2007. I'll take another look at it using your calendar. It may take a while...lots of code there.

    John

  11. #11
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    From my understanding of the calendar code, as I have used this in 3 seperate user forms is this:
    1. frmCalendar is just for the layout or appearance
    2. mGlobals show the dates as a string
    3. clsCmdButton makes all the buttons on the calendar works
    All 3 of those must go in a worksheet to make the calendar work (you do not need to modify those codes at all), the trick is to connect those three with the user form, and you do that by entering part of this code:
    Please Login or Register  to view this content.
    Sounds easy for someone more skilled then me, but my issue is that I am not used to connecting it to a sheet without a userform, but I kind of like not having to use the userform, for this particular layout.

    I think I need to name the fields "Start Date" field and "Finish Date" field are in to show something like "txtStartDate" and "txtFinishDate" and then Link the above code to those fields.

    I have been playing around with it, and so far, no good.

    But I will keep trying and if I am successful, as always I will post my results, until then...any help is appreciated.

  12. #12
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    Take a look at this link http://social.answers.microsoft.com/...9-e757223ebdde it may help explain what's going on. Don't know if or how it helps but it may give you something to research in your spare time.

    John

  13. #13
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Quote Originally Posted by jaslake View Post
    Hi 00Able

    Take a look at this link http://social.answers.microsoft.com/...9-e757223ebdde it may help explain what's going on. Don't know if or how it helps but it may give you something to research in your spare time.

    John
    Very good read, wish I knew this before I installed Office 2010 in the 64 bit mode...Thanks for sharing.
    I checked out the downloads available for the 64 bit, but if you want to use it and share, you have to buy several licenses for it after the free trial period, as this is something I need my co-workers to use, and at work we use Office 2003 32 bit, I am not sure that this would be the best route for me to do. As I don't think the 64 bit will be compatible with the 32 bit version I use at work.

    So I guess I will keep plugging away at my previous thread...

  14. #14
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    Where did you get this calendar code? Perhaps if I looked at your source, I could understand how all this links together.

    John

  15. #15
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    Well, I got your code to run on my machine. I need to do a lot more testing but before I go beating the horse, I need to know if it runs on your machine.

    Again, error checking needs added.

    I'd still like to know the source of this code.

    Let me know what happens.

    John
    Attached Files Attached Files
    Last edited by jaslake; 12-05-2010 at 02:15 PM.

  16. #16
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    When I open the worksheet you attached I get an error, Break in Code. It highlights this part of the code:
    Please Login or Register  to view this content.
    but after I really looked at the code, most of the original calendar code is showing up Green, as you are reading it, not actually using it.

    Another user recommended that I use this calendar, and was helpful with previous projects I was working on. (RoyUK) and I got it from this site:
    http://excel-it.com/free_addins.htm from this part of the sheet
    UserForm calendar is available with code & examples of how to use it. Free download...
    which takes you to this link:

    http://www.4shared.com/file/10957606...endarv102.html

    Its not the best looking calendar I have seen, but its nice and it works on every machine I need it to, so that is sufficient for me.

  17. #17
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    I've downloaded the file from http://www.4shared.com/file/10957606...endarv102.html. I can follow what it's doing.

    Couple of questions;

    First question
    Does the code work in your environment?
    BootCamp with Windows 7 64bit, and Excel 2010
    It does work in my environment, Fusion, Windows XP, Excel 2000.

    Second question
    There's a LOT more code in your posted file. Why?

    John

    Sorry, I should have ask "Does the sample file in the download work in your environment?"
    Last edited by jaslake; 12-05-2010 at 07:58 PM.

  18. #18
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    First question
    Does the code work in your environment? It does work in my environment, Fusion, Windows XP, Excel 2000. -Sorry, I should have ask "Does the sample file in the download work in your environment?"
    Yes, I have used this code in several instances, the calendar works fine, and I am able to use it in my work environment as well. I am very pleased with it.


    Second question
    There's a LOT more code in your posted file. Why?
    I am not sure, I may have copied and pasted it and accidentally wrote on top of other code. I do know it is increasing the size of the file, and I am not sure how to "Lean" it down.

  19. #19
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    Alright then. We have code that works for both of us (at least in the sample file that we both downloaded). We have a baseline to work from. I think I can resolve the issue (don't know for certain but I love a challenge). I'll get back to you ASAP.

    John

  20. #20
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    please be sure to make sure you relook at my attachment, as I have updated it to include a userform, should I not be able to use the activex controls.

  21. #21
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    Where did you post the "New" attachment? If to a previous post, I'd have no way of knowing that. I ALWAYS post new attachments to a new post to let viewers know that they have updated information.

    If you have a new file, please include it in a new post to your thread.

    John

  22. #22
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    yeah its the only attachment in this thread, but again all it includes is a userform layout, nothing big, I will include it here as well... I included it as I was hoping to be able to connect it to the activex controls on the "Front Page", but I have no knowledge of how to assign it to those fields (only because I can't get those fields to do what I want it to do and I am more familiar with the use of userforms), alas many attempts, many failures...but I try try again...
    Last edited by 00Able; 12-18-2010 at 12:17 PM.

  23. #23
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    I'd like you to humor me for a moment if you will. Open the attached file and click on Calendar then click on a date (any date). Does it fill the "Active Cell" with the date you selected?

    This is just a test so I know we're functioning the same on our platforms. We're on two different operating systems (Windows 7 vs XP) with two different versions of Office (2010 64 bit vs 2000/2007 32 bit) with two different versions of emulation Software (Bootcamp vs Fusion).

    I 'm pretty certain we can get this resolved but I'm going to be a pain in the butt. I'm going to ask you to test things I have working on my platform each step of the way.

    Are you game?

    John
    Attached Files Attached Files

  24. #24
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Yes it works fine, I was able to select a date and it appeared on the active cell...

  25. #25
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Alright, good.

    I'm posting a test workbook with this. It has error checking issues but I'd like for you to see if it runs in your environment. I'd like you to click on the box to the right of "Start Date", select a date then click on the box to the right of "End Date" and select a date. Then click "Pull Data".

    Remember, there's no error checking yet so limit your choices to dates available in the files.

    I'll be online for another hour or so, so let me know what happens.

    John
    Attached Files Attached Files

  26. #26
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Now this returns errors, as soon as I open file I get the first error, I labeled them according to where I see them...and try to walk through them...hope this helps, It does not show the calendar, nor let me enter any dates in the field.

    I believe I am getting this error because of userform2 that is in the VB project, I dont think we are using that, so can we just delete that form out?
    Last edited by 00Able; 12-18-2010 at 12:17 PM.

  27. #27
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    Fishing here. I've only changed about four lines of code in the test file I sent you previously.

    Look at the file I've attached regarding References. Are your's set the same?

    John
    Attached Images Attached Images

  28. #28
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Yes, you can
    I believe I am getting this error because of userform2 that is in the VB project, I dont think we are using that, so can we just delete that form out?
    John

  29. #29
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    here is my screen shot
    Last edited by 00Able; 12-18-2010 at 12:17 PM.

  30. #30
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    I'm going to clean up the file, removing all extraneous code, Userforms, etc.

    I'll post this new file later this PM.

    John

  31. #31
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    OK, get rid of the missing reference (unclick it) then click OK. This should eliminate at least one issue.

  32. #32
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    I appreciate all your effort, get some rest...seems like we are getting somewhere...

  33. #33
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Going to bed soon. We're in the same time zone. This is only difficult because our environments are so different. The encouraging thing is that the code worked here
    Yes it works fine, I was able to select a date and it appeared on the active cell...
    We'll get it...if you wish.

    John

  34. #34
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    I've removed all extraneous code, modules and forms from the attached. Please see if the results are any better.

    John
    Attached Files Attached Files

  35. #35
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Yes the results are much improved, now if we can make it erase all the previous data each time we reset the dates, I think it will be perfect.

  36. #36
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    This should be no problem
    if we can make it erase all the previous data each time we reset the dates
    said the blind man.

    I'll work that into the code and get back to you. All else seems to work as expected?

    John

  37. #37
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    From what I can tell, everything is working fine, again only issue when testing, since it is just a sample file, there is not enough data in there to fully get a good view, considering the data overlaps when you reset and add new dates.

  38. #38
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    Adding new dates "should" not be a problem (yeah, right!). There are error checking issues to deal with.

    I'm not sitting in your chair and I can only guess at what you need. I'll try to anticipate those needs but, ultimately, only you (and your users) know.

    I'll work on this for the moment
    erase all the previous data each time we reset the dates
    May well post tonight.

    John

  39. #39
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    Try the attached to resolve this issue
    erase all the previous data each time we reset the dates
    Hope we've not screwed it up!

    John
    Attached Files Attached Files

  40. #40
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    I have checked every scenerio and it seems to work flawlessly, now can we get the formatting to do the same, so it only shows the formating for the dates selected. As some of the formating will be highlighted depending on what is indicated in the cell.

    Hope we've not screwed it up!
    Nope it looks wonderful so far, one more step and I will test it in a rl scenerio.
    Also you said you liked a challenge, I encourage you to read my next Post and see if you have any thoughts...

  41. #41
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    If I understand the issue, this is resolved in the attached
    get the formatting to do the same
    I've also added error checking in this version.

    John
    Attached Files Attached Files

  42. #42
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Absolutely brilliant, thanks for your dedication. Everything I have done so far works exactly as it should, I am going to change this to a rl habitat, and see what happens.

  43. #43
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    Glad to be of help. I'd assume your going to run it on a copy of your real file? Let me know of issues.

    I've got an updated version that deals with locking of cells, protection, etc. I'll post it in a short while. If you're interested, fine. If not, fine.

    John

  44. #44
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    I was having a problem with protection schemes in the earlier version so I excluded it. I was able to sort out my problem and that feature is included in the attached.

    John
    Attached Files Attached Files

  45. #45
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    I took a glimpse at the most recent one Test Tracker 10.xls to see any variance, I believe it has the formatting locked. As it does not reset with the data, as the previous attachment did.

  46. #46
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    Hi 00Able

    Yeah, well. I was just trying to tighten things up a bit. The code runs fine from the Forum copy and on my machine. Must be an Excel version issue. If that's what it is, I can't resolve it as I don't have your version.

    Hopefully, Test Tracker 9.xls performs to your satisfaction. We'll keep playing with that version.

    Let me know of issues.

    John
    Last edited by jaslake; 12-07-2010 at 09:29 PM.

  47. #47
    Forum Contributor 00Able's Avatar
    Join Date
    11-17-2010
    Location
    Pittsburgh, PA
    MS-Off Ver
    Excel 2003, 2007, 2010
    Posts
    244

    Re: Macro To Pull Last week worth of Data out of a Worksheet

    jaslake, I am going to mark this thread as solved, but I do have more issues. I posted another thread, as it is dealing with other things in nature, but still has to do with this task. Again, I want to express my extreme gratitude for your assistance, if you wish please feel free to check out my recent post.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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