07-22-2010 06:04 AM
I assume I can use a similar procedure for this other operation as well. For now the answer was small enough (9,616 records in ARRAY1 and 12 records in ARRAY3) that I was able to do via copy and paste in Excel, but in the future I wish to do this automatically as well. I assume you noticed that there was a time and date column in ARRAY1. My project really has three input arrays not two. I figured once I figure out how to combine two I can use the same process on the third.
But the third is a little different. For the third I only have data at the top of the hour. Therefore I wish to first compare on the date as before but then need to compare and match on the time and I only wish to use the HOUR. ALL records in the final output array ARRAY4 must have the data in ARRAY3 combined with ARRAY1 matching the HOUR.
I will try to make the this code later but if you beat me to it that would be greatly appreciated.
07-22-2010 10:25 AM
Holy crap, a chance to use a regex and variants in the same solution. My mouse hand is twitching uncontrollably, but I will let you have the fun and just give you a couple of tips. I will make a few assumptions based on your data.
First, copy the first For Loop in my example to create a second variant for what you now call Array 3 (top of the hour data). In the other For Loop you need to change the code that appends data. Now you also need to get the corresponding value from Array 3. To convert the key, take the one you got from Array 1 in the form of date-tab-HH:MM:SS and use Search and Replace as follows to make it date-tab-HH:00:00, get the value of this key from the new variant you created and append it as well. You may want to double check that it exists, or just assume that it will if you know your data.
Let me know if you need more advice, and if you do, please be prepared to post a little bit of data (not your entire files!) The regex if you are interested looks for a tab, some digits (which it keeps) a colon and then anything. In the replace regex I put back the tab, the digits that matched (that is what $1 means), and :00:00.
07-22-2010 12:09 PM
@Darin.K wrote:
Holy crap, a chance to use a regex and variants in the same solution. My mouse hand is twitching uncontrollably,
Darrin, you need professional help. ![]()
07-22-2010 12:16 PM
04-01-2019 10:25 PM
Hi @Garin.K, what about this in one array compare two columns values and get 3rd column value in variants method.
04-01-2019 10:54 PM
@sam67 wrote:
Hi @Garin.K, what about this in one array compare two columns values and get 3rd column value in variants method.
What about you replying to a 9 year old thread with a cryptic sentence that makes little to no sense? It is not even obvious if you have a question or a suggestion! (And it's Darin, not Garin.)
Please clarify...
04-02-2019 12:37 AM
@altenbach 작성:Please clarify...
Please see the attached picture. In this file, there are some columns, Column D and J has some specific same range of data. I need to match these values and then those values which is in column C corresponding to those match values which is in columns D and J. Thanks Sir
04-02-2019 11:55 AM
You are still not making sense. What do you want to "match" with what and what should happen if a match occurs?
04-02-2019 07:44 PM
@altenbach 작성:
You are still not making sense. What do you want to "match" with what and what should happen if a match occurs?
Hi, for example in column D and J has value 15.63 15.34 15.67 ........, and in corresponding the column C has value 25 24 25 53 22 32 43 25. like this i need these values.
04-02-2019 11:51 PM
You are spreading your questions around to multiple threads just fragmenting the discussion even more.
Please stick to one thread!
I would suggest this one https://forums.ni.com/t5/LabVIEW/Searching-from-excel-file/td-p/3884173 since it is your own thread and not an ancient one. It is ridiculously long, but at least anyone else who tries to help will have the benefit of seeing all the messages already added that hopefully you have read by now that tell you what you need to do.