+ Reply to Thread
Results 1 to 14 of 14

Moving data based on the date

  1. #1
    Registered User
    Join Date
    01-24-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Moving data based on the date

    Can anybody help me write a macro code wherein:

    If I enter date as 1 then a particular selection shows up under Column A
    Similarly, if I enter date as 2 then a particular selection shows up under Column B and so on.

    I have an attchment that has sample data that will help you understand the situation
    Attached Files Attached Files

  2. #2
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Moving data based on the date

    Moving what data?

    You may need to fill in some gaps in the explanation here...

    Where does the data come from and where are you entering the 1 or 2...?
    HTH
    Regards, Jeff

  3. #3
    Registered User
    Join Date
    01-24-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Moving data based on the date

    S5 is the cell where I will enter date and I have highlighted the data i.e. S7:S10
    Last edited by Punter!; 01-26-2013 at 07:39 PM.

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Moving data based on the date

    This still does not mean anything to me.

    How about making a before and after in the attachment.

  5. #5
    Registered User
    Join Date
    01-24-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Moving data based on the date

    Quote Originally Posted by jeffreybrown View Post
    This still does not mean anything to me.

    How about making a before and after in the attachment.
    Here is the attachment? I'm sorry since I was not able to explain the problem earler, hope this helps.
    Attached Files Attached Files

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Moving data based on the date

    Maybe this is what you are wanting...

    It runs off of a worksheet change event when a date is selected from C5...
    Attached Files Attached Files

  7. #7
    Banned User!
    Join Date
    10-14-2006
    Posts
    1,211

    Re: Moving data based on the date

    See the attached
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    01-24-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Thumbs up Re: Moving data based on the date

    Quote Originally Posted by jeffreybrown View Post
    Maybe this is what you are wanting...

    It runs off of a worksheet change event when a date is selected from C5...
    Awesome! Thanks Jeffi! This answers my question!

  9. #9
    Registered User
    Join Date
    01-24-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Moving data based on the date

    Quote Originally Posted by Teethless mama View Post
    See the attached
    Thank You - Your formula did the same thing that I wanted a macro to do...TYVM

  10. #10
    Registered User
    Join Date
    01-24-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Moving data based on the date

    Hi, If we can keep data to stay at the old position as well. For eg: If we toggle between date?

  11. #11
    Registered User
    Join Date
    01-24-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Moving data based on the date

    Jeff,

    How can I get this functionality if I only have one sheet?

  12. #12
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Moving data based on the date

    Hi, If we can keep data to stay at the old position as well. For eg: If we toggle between date?
    I'm guessing you are asking for the data to be stacked on top on each other if data is already there? If so...

    Please Login or Register  to view this content.
    How can I get this functionality if I only have one sheet?
    I'm not so clear on this. Do you mean you just have one sheet so you want the results to be pasted above the drop down which is in row 5?

  13. #13
    Registered User
    Join Date
    01-24-2013
    Location
    India
    MS-Off Ver
    Excel 2010
    Posts
    18

    Re: Moving data based on the date

    Thanks Jeffi! Your earlier code is working well for me...Thanks again for your time and patience.

    Moderators Note:
    • As per Forum Rule #12, please don't quote whole posts unless necessary-- it's just clutter...Thanks.
    Last edited by jeffreybrown; 01-30-2013 at 08:36 AM.

  14. #14
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Moving data based on the date

    Glad to hear it and you're welcome.

+ 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