• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Help to copy data from one sheet to another according to date

Fred Wayne

Member
Hello,
I have an excel file called "Data", it has 2 sheets named "Data" and "Daily". Data several values, and Daily has nothing, "At the moment". I have created a simple userform with a ComboBox that displays the some dates to choose from. I need to find out a code to filter data from Data sheet and copy the data in Daily sheet according to the date chosen from the ComboBox. Is this posible?

Here you have the file I am using now. Thank you again.
 

Attachments

  • Data.xlsm
    20.5 KB · Views: 7
But I am trying to set this coding to my file and for some reason I can´t make it run. Can you help me please? Here I am sending the orignal file, I need that all data stored in Sheet called "Data Base" to be transfered by date selection to Sheet called "Daily". I don't know what I doing wrong! Thannk you sooooooooooooo much for the help in advance.
 

Attachments

  • Core and Concierge Crosscheck.xlsm
    715.9 KB · Views: 9
Ohhhh I forgot to send the original file with the Print Data form. Here is the one with this already add. Please forgive for my file sending mistake.
 

Attachments

  • Core and Concierge Crosscheck.xlsm
    718.9 KB · Views: 4
It works amazing! But for some reason, when I empty the Sheet "Data Base", I got an error that says "Run-Time error '13': Type mismatch, and when I manually enter the data, the main userform works. Another situation that happens is on the "Printing Data" userform, I don't know why it displays "22/03/2030" as the date when it should display "30-03-2022 06:39 PM". Once again, thank you for the extraordinary help!
 

Attachments

  • Capture3.JPG
    Capture3.JPG
    104.9 KB · Views: 7
  • Capture2.JPG
    Capture2.JPG
    28.7 KB · Views: 7
  • Capture.JPG
    Capture.JPG
    30.8 KB · Views: 6
  • Core and Concierge Crosscheck-1.xlsm
    742.8 KB · Views: 5
It would be better to Printing Data form to show the following format "30-03-22" I have tried to modify the date format and I could have not gotten it so far.
 
I have managed the Printing Data form to display the dates as 01/04/2022, but what I can not understand is why the format of the dates in the sheet called "Daily" does not display the dates of the months in consecutive day order, for example, from 1-4-22, follows 2-4-22, then 3-4-22, then 4-4-22 and so on forth. But it does not make consecutive day order, what it does is consecutive month order. What can I do to fix it?, The same happens when I open the Printing Data ComboBox, it displays the dates in consecutive month order instead of consecutive day order. So it means that I cannot filter because the dates from the ComboBox don't match with the dates displayed on LB_00 ListBox. I am becoming crazy about finding a solution to this! Help, please. I am sending the original file plus some pictures of the errors on the dates! Thank you in advance.
 

Attachments

  • DATES.JPG
    DATES.JPG
    36.5 KB · Views: 3
  • Core and Concierge Crosscheck-1.xlsm
    741 KB · Views: 4
  • DATES2.JPG
    DATES2.JPG
    78.9 KB · Views: 4
  • DATES1.JPG
    DATES1.JPG
    64.7 KB · Views: 4
Fred Wayne
Have You tested Your dates with YY-MM-DD? (( or DD-MM-YY ))
... then those dates would work as text or real dates
As You're using UserForm - I won't test Your file.
 
Nope. It didn't work. I will see what can I do. But I have tried doing it in so many times, however, I don't give up.
 
Hello. I was working on this file for a project. The Project was a success. How now I have some issues. The issue is displayed on the userform called "Print_DATA". For some reason, I can´t fathom, the userform displays the information already entered in a date format which is not correct. So it means that instead of displaying 5/15/2022, it displays 5/22/2015. I just don´t know what to do? I have tried different coding combinations and it has become a hard-no-win for me. Is there a way to fix this? I am using windows 10 and Microsoft Office Professional 2013. Please help! I would really appreciate it. Thank you in advance.
 

Attachments

  • Capture1.JPG
    Capture1.JPG
    56.6 KB · Views: 1
  • Capture2.JPG
    Capture2.JPG
    87.9 KB · Views: 1
  • Capture3.JPG
    Capture3.JPG
    41.9 KB · Views: 2
  • Core and Concierge Crosscheck-1.xlsm
    930.4 KB · Views: 2
Fred Wayne
Few comments - questions ...
Date ... formats ... Is there any reason that You're using many kind of ... formats with dates?
One sheet - below - 03/04/2022 17:02 is real date but other two are not ... looks act like texts.
Screenshot 2022-05-15 at 16.13.38.png

My Excel-version ... didn't open Your PRINT_DATA -form ... that's normal.
But I found from its code two kind of date formats.
Screenshot 2022-05-15 at 16.14.44.png

Your 5/15/2022, it displays 5/22/2015
Looks like year and day has swapped.
Do You save forms-dates as text or as date to Your sheets?
... if You're saving as text then, there will be some challenges.
 
There is a sheet called "Dates" and another called "DataBase". Both sheets are VeryHidden and have dates formats information.
 
Fred Wayne
I found those sheets.
One sheet - below - 03/04/2022 17:02 is real date but other two are not ... looks act like texts.
Have You tried to fix manually those two 15-05-22 ... -texts to real dates?
Screenshot 2022-05-15 at 16.13.38.png
Isn't Your challenge 5/15/2022, it displays 5/22/2015 somewhere?
It matters, what is in those cells - with format - You could apply wanted look.
 
Fred Wayne
No matter of format!
Please,
write to cell J3 values as below written in cell C6 and
write to cell J4 value as below written in cell C7.
Screenshot 2022-05-15 at 17.25.05.png
Cell's value matters.
 
Back
Top