comparison

Excel VBA comparing two workbooks

痞子三分冷 提交于 2020-01-17 02:22:27
问题 I'm trying to create a macro which compares two Excel files. The only column both Excel files have in common is " eRequest ID ". The goal is to display any records that DO NOT have an " eRequest ID " in both files. For example, if record 1 is only found in one of the two files, it has to be displayed. The only situation where records are not displayed is if the " eRequest ID " is found in both files. On a side note.. I recorded a simple macro to filter out some fields... I have to add in this

Excel VBA comparing two workbooks

亡梦爱人 提交于 2020-01-17 02:20:32
问题 I'm trying to create a macro which compares two Excel files. The only column both Excel files have in common is " eRequest ID ". The goal is to display any records that DO NOT have an " eRequest ID " in both files. For example, if record 1 is only found in one of the two files, it has to be displayed. The only situation where records are not displayed is if the " eRequest ID " is found in both files. On a side note.. I recorded a simple macro to filter out some fields... I have to add in this

Google Spreadsheet comparison using TIME function for 10:40:00 fails

吃可爱长大的小学妹 提交于 2020-01-15 08:58:46
问题 I'm having a problem when comparing cells with value 10:40:00 to the result of the spreadsheet function TIME(10,40,0) A series of comparisons shows that values from 8:40 to 10:39:59 and from 10:40:01 to 13:40:00 compare correctly but 10:40:00 incorrectly returns FALSE for the comparison. Am I missing something or is this a bug? 回答1: I've played around with your spreadsheet and I think I've found the reason. This has got to be a bug (or at least an inconsistency in reading time literals). Take

SQL double comparison

一笑奈何 提交于 2020-01-15 07:15:53
问题 let's say I have following SQL column: Now, I want to do following: In col_1, I have the value 'one'. If I check, which corresponding values I get in col_2 I get for that, I find 'two' and 'three'. So the results would be 'two' and 'three'. But from this result set, I want to only have those, that, used in col_1 , have, in col_2, the corresponding value 'one'. So: 'two', in col_1 , does have 'one' in col_2 , but three doesn't. So, from the result set of {'two', 'three'} only {'two'} would

Comparing array elements including duplicates

青春壹個敷衍的年華 提交于 2020-01-15 05:17:07
问题 I am trying to see if an array contains each element of another array. Plus I want to account for the duplicates. For example: array = [1, 2, 3, 3, "abc", "de", "f"] array contains [1, 2, 3, 3] but does not contain [2, 2, "abc"] - too many 2's I have tried the below but obviously doesn't take into account the dupes. other_arrays.each { |i| array.include? i } 回答1: This method iterates once over both arrays. For each array, it creates a hash with the number of occurences of each element. It

Comparing two decimals

自作多情 提交于 2020-01-14 13:14:37
问题 I want to compare two decimals in c# with some margin of error. Can anyone point out problem with the following code. Note that I am interested in 6 decimal places after that I could ignore the values. var valOne = decimal.Round(valueOne, 6); var valTwo = decimal.Round(valueTwo, 6); var difference = Math.Abs(valOne - valTwo); if (difference > 0.0000001m) { Console.WriteLine("Values are different"); } else { Console.WriteLine("Values are equal"); } or is there a better way. 回答1: If you are

Comparing two decimals

[亡魂溺海] 提交于 2020-01-14 13:10:12
问题 I want to compare two decimals in c# with some margin of error. Can anyone point out problem with the following code. Note that I am interested in 6 decimal places after that I could ignore the values. var valOne = decimal.Round(valueOne, 6); var valTwo = decimal.Round(valueTwo, 6); var difference = Math.Abs(valOne - valTwo); if (difference > 0.0000001m) { Console.WriteLine("Values are different"); } else { Console.WriteLine("Values are equal"); } or is there a better way. 回答1: If you are

Why C compiler cannot do signed/unsigned comparisons in an intuitive way [closed]

自作多情 提交于 2020-01-14 10:26:08
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . By "intuitive" I mean given int a = -1; unsigned int b = 3; expression (a < b) should evaluate to 1. There is a number of questions on

Find different word between two strings

雨燕双飞 提交于 2020-01-14 09:24:56
问题 I have a large list of phrases such as "Nola jumped off the cliff" "Loroy jumped off the cliff" "Nola jumped off the couch" "Leroy lept off the couch" I need to find each point in a phrase that is a different word and add that word to a node, which is a list of words that can be used in that position in a phrase. So we would end up with. "Node1(1) Node2(1) off the Node3(1)" "Node1(2) Node2(1) off the Node3(1)" ...etc Where node 1 represents a list of the names(Nola,Leroy), node2 represents a

Find different word between two strings

青春壹個敷衍的年華 提交于 2020-01-14 09:24:12
问题 I have a large list of phrases such as "Nola jumped off the cliff" "Loroy jumped off the cliff" "Nola jumped off the couch" "Leroy lept off the couch" I need to find each point in a phrase that is a different word and add that word to a node, which is a list of words that can be used in that position in a phrase. So we would end up with. "Node1(1) Node2(1) off the Node3(1)" "Node1(2) Node2(1) off the Node3(1)" ...etc Where node 1 represents a list of the names(Nola,Leroy), node2 represents a