• 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.

Issue with dates format

Status
Not open for further replies.

abhi_jain80

New Member
Hi folks,

I got the support on vba script from another excel forum in which the code is pulling out the data in new worksheet from two worksheets for the unique transactions on click of the button. Here is the link...https://www.excelforum.com/excel-programming-vba-macros/1349511-new-worksheet-based-on-multiple-worksheets.html#post5523218

It is absolutely working fine except the date format issue...All the dates appeared in the "output" sheet are not in date format, some are in text format while in the "transactions" sheet from where the dates are being pulled are in date format. See the sample file attached (issue highlighted in yellow color). I observed that this issue appears only where there is only 1 transaction.

I spent loads of time on the issue but could not be able to figure out the workaround. Hope I am clear with the requirement. Just wondering if anybody came up with the same issue or aware of any solution. Many thanks in advance...
Abhi
 

Attachments

  • Copy of sample data (1).xlsb
    894.4 KB · Views: 2
Hi,​
so the code is not good for your need and it's weird to ask on another forum than the one where you grabbed it …​
Use the Range.Copy method in order to keep the data type as it is in the source sheet.​
 
Hi Marc,
The code is good for my need, the only thing...it is not giving the dates in the right format. I am newbie to vba, would be of great help if you could modify the code with Range.Copy method, as you are suggesting.

You will see the thread is closed in another forum and there is no solution available for this issue, hence thought of reaching out to another forum for expert comments. I hope this helps...Thanks
 
Last edited by a moderator:
This thread is closed as I solved it in the original forum - classic beginner trap when a range property is missing - for a reminder to the code author …​
 
Status
Not open for further replies.
Back
Top