I'm working in VBA for Excel. Got the following raw data:
**TIME** **PRICE**
04-02-2013 10:36:00 560
04-02-2013 12:40:00 600
03-02-2013 16:10:00 612
I need an efficient and trustworthy method of stripping the time from the datetime TIME and then sorting on TIME NEWEST first and PRICE DESCENDING second. Desired output:
**TIME** **PRICE**
04-02-2013 600
04-02-2013 560
03-02-2013 612
Simply changing the column format and forcing DD-MM-YYYY does not work. I've tried a few things myself, for example by converting the column to TEXT and stripping the time by removing every thing after the decimals in the displayed datetime-values, but it didn't work out. I hope you can help me!
Simply changing the column format and forcing DD-MM-YYYY does not work.
Since like your date/time is stored as text. Try this
=TEXT(A1,"DD/MM/YYYY")

FOLLOWUP FROM COMMENTS
I am able to get the desired out by simple sorting?

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With