+ Reply to Thread
Results 1 to 20 of 20

Moving info from 1 tab to another depending on date??

  1. #1
    Forum Contributor
    Join Date
    10-17-2007
    Location
    Midlands, UK
    MS-Off Ver
    2003
    Posts
    149

    Question Moving info from 1 tab to another depending on date??

    Hi everyone!!

    I think it is a macro i am after for the attached?? I want to take money outstanding by a certain team for 1 to 30 days 31-60 days etc and move this to a totals tab i suppose i would call it....

    Not really explained very well but if you could have a look at the attached and any help would be much appreciated.......
    Attached Files Attached Files

  2. #2
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Moving info from 1 tab to another depending on date??

    Should the data be taken from the outstanding tab? Should it be 1 to 30 days from the current date?
    If I have helped, Don't forget to add to my reputation (click on the star below the post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)
    Use code tags when posting your VBA code: [code] Your code here [/code]

  3. #3
    Forum Contributor
    Join Date
    10-17-2007
    Location
    Midlands, UK
    MS-Off Ver
    2003
    Posts
    149

    Re: Moving info from 1 tab to another depending on date??

    Yes and yes, thanks...

  4. #4
    Forum Contributor
    Join Date
    10-17-2007
    Location
    Midlands, UK
    MS-Off Ver
    2003
    Posts
    149

    Re: Moving info from 1 tab to another depending on date??

    Quote Originally Posted by arlu1201 View Post
    Should the data be taken from the outstanding tab? Should it be 1 to 30 days from the current date?
    Any idea's with this then arlu1201??

  5. #5
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Moving info from 1 tab to another depending on date??

    I have updated the code that you had in the Outstanding sheet to this
    Please Login or Register  to view this content.
    The code will insert a formula in column G which will give you the time intervals. Then you can create a pivot to get the summary you need. (Pivot can be automated too).

    The following are the fields for your pivot -
    Row Labels: Team
    Column Labels: Time Intervals
    Values: Sum of Invoiced (Gross)

  6. #6
    Forum Contributor
    Join Date
    10-17-2007
    Location
    Midlands, UK
    MS-Off Ver
    2003
    Posts
    149

    Re: Moving info from 1 tab to another depending on date??

    The code is great thanks!!

    You say the pivot can be automated, does this mean the pivot can be generated automatically?? If so how do i do this please??

    Cheers
    Frazz

  7. #7
    Forum Contributor
    Join Date
    10-17-2007
    Location
    Midlands, UK
    MS-Off Ver
    2003
    Posts
    149

    Re: Moving info from 1 tab to another depending on date??

    I have tried the code you gave and it is great but it conflicts if the date is exactly 30, 60 or 90 days prior to today's date, every other date works find just not when they fall on either of those 3???? (when it is 30, 60 or 90 days the G column says 90+ days as if its conflicting)

  8. #8
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Moving info from 1 tab to another depending on date??

    Ok, i will check into the conflict and let you know.

    Regarding the pivot, you can have a code that creates / refreshes it at the bottom of your above code.

  9. #9
    Forum Contributor
    Join Date
    10-17-2007
    Location
    Midlands, UK
    MS-Off Ver
    2003
    Posts
    149

    Re: Moving info from 1 tab to another depending on date??

    Sorry to keep asking but do you know the code i need?? If it could generate the pivot on a new tab that'll would be great???

    Thanks for all your help!!!!

  10. #10
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Moving info from 1 tab to another depending on date??

    Quote Originally Posted by Frazzfreeman View Post
    I have tried the code you gave and it is great but it conflicts if the date is exactly 30, 60 or 90 days prior to today's date, every other date works find just not when they fall on either of those 3???? (when it is 30, 60 or 90 days the G column says 90+ days as if its conflicting)
    I checked it again by changing some dates and it works perfectly fine. Can you check it again at your end?

    Regarding the pivot, you can create it the first time manually. Then we can have one line of code at the end of the previous code to refresh the pivot, each time the outstanding tab gets refreshed.

  11. #11
    Forum Contributor
    Join Date
    10-17-2007
    Location
    Midlands, UK
    MS-Off Ver
    2003
    Posts
    149

    Question Re: Moving info from 1 tab to another depending on date??

    I've added a pivot into a new tab which works fine, only issue is that the data from the PIVOT TAB then goes onto the outstanding tab at the bottom??? It must be picking that up too??

    I've attached a copy....
    Attached Files Attached Files

  12. #12
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Moving info from 1 tab to another depending on date??

    You have this line of code
    Please Login or Register  to view this content.
    Add the pivot tab to it
    Please Login or Register  to view this content.

  13. #13
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Moving info from 1 tab to another depending on date??

    Use this updated code. It will refresh the pivot for you as well.

    Please Login or Register  to view this content.

  14. #14
    Forum Contributor
    Join Date
    10-17-2007
    Location
    Midlands, UK
    MS-Off Ver
    2003
    Posts
    149

    Re: Moving info from 1 tab to another depending on date??

    Quote Originally Posted by arlu1201 View Post
    I checked it again by changing some dates and it works perfectly fine. Can you check it again at your end?
    The conflict actually happens when the Invoice Date is the same as Today's date, anyway round that??
    Last edited by arlu1201; 04-21-2012 at 07:12 AM.

  15. #15
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Moving info from 1 tab to another depending on date??

    Just change this line
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  16. #16
    Forum Contributor
    Join Date
    10-17-2007
    Location
    Midlands, UK
    MS-Off Ver
    2003
    Posts
    149

    Re: Moving info from 1 tab to another depending on date??

    I'm pretty sure it is all sorted now, thanks for all your help!!!

  17. #17
    Forum Contributor
    Join Date
    10-17-2007
    Location
    Midlands, UK
    MS-Off Ver
    2003
    Posts
    149

    Re: Moving info from 1 tab to another depending on date??

    I've added some data on to the April tab which goes into the outstanding tab ok and the pivot table refreshes with this new data but it deletes the older data (from the January tab). I'm assuming this is because the pivot is only picking up data from the initial RANGE i selected when i made the initial Pivot?? I cant select the whole column for the pivot range because the pivot won't work if it has blank cells i believe?? Is there anyway round this??

    Thanks
    Frazzfreeman
    Attached Files Attached Files

  18. #18
    Forum Contributor
    Join Date
    10-17-2007
    Location
    Midlands, UK
    MS-Off Ver
    2003
    Posts
    149

    Re: Moving info from 1 tab to another depending on date??

    I have sorted it now!! just changed the field of the pivot to cover the whole column and took the blanks off the table!!

  19. #19
    Forum Contributor arlu1201's Avatar
    Join Date
    09-09-2011
    Location
    Bangalore, India
    MS-Off Ver
    Excel 2003 & 2007
    Posts
    19,166

    Re: Moving info from 1 tab to another depending on date??

    Glad it worked for you.

  20. #20
    Forum Contributor
    Join Date
    10-17-2007
    Location
    Midlands, UK
    MS-Off Ver
    2003
    Posts
    149

    Re: Moving info from 1 tab to another depending on date??

    Thanks for all your help!!!

+ 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