Hello all! First of all, many thanks for the help from other posts as i have been using them to improve my Excel/VBA skills. However, no help i have been able to found for this particular situation. Here is the main idea (which i have already tested sucesfully)
I need to compare the values, cell by cell, between two ranges, as the information from one side has to match the other, and in case there is a discrepancy, insert a row with data, and do some other stuff. I use a For loop to go through the fixed range, storing the value of the cell in a variable, and then use it as a the value to count in the countif.
While for most of the data stored it works just fine, there is issue with some values, which are more than 15 digits long and only numbers, which makes the count if "useless" as the last digits are different, but the first 15 are the same. I have read that for excel, using sumproduct is a way to surpass this limitation, but cannot find a "good way" to implement it in my code. Are there any other options to surpass the 15 digit limitation?
Further conditions:
1) One range is fixed, and the other one is variable, as rows will be inserted here and there when needed. Preferable if i could take full column.
2) Ranges are in separated worksheets, same workbook. Fixed range is 3rd sheet, Variable range is 2nd sheet.
3) If the countif(or its "similar" formula") returns 0 in the range from the second sheet, there are two other columns in the third sheet two use to compare and find. So the main range is column B, and the "auxiliar" are C and D. If no data is found, it will take data from the fixed range to paste it in the variable.
Most of the code has been already implemented, only would need to implement that "extra condition" to avoid Excel from usign only the 15 digits.
Appreciated any help. If requested, I could try to implement the full code tomorrow morning (CEST Time)
I need to compare the values, cell by cell, between two ranges, as the information from one side has to match the other, and in case there is a discrepancy, insert a row with data, and do some other stuff. I use a For loop to go through the fixed range, storing the value of the cell in a variable, and then use it as a the value to count in the countif.
While for most of the data stored it works just fine, there is issue with some values, which are more than 15 digits long and only numbers, which makes the count if "useless" as the last digits are different, but the first 15 are the same. I have read that for excel, using sumproduct is a way to surpass this limitation, but cannot find a "good way" to implement it in my code. Are there any other options to surpass the 15 digit limitation?
Further conditions:
1) One range is fixed, and the other one is variable, as rows will be inserted here and there when needed. Preferable if i could take full column.
2) Ranges are in separated worksheets, same workbook. Fixed range is 3rd sheet, Variable range is 2nd sheet.
3) If the countif(or its "similar" formula") returns 0 in the range from the second sheet, there are two other columns in the third sheet two use to compare and find. So the main range is column B, and the "auxiliar" are C and D. If no data is found, it will take data from the fixed range to paste it in the variable.
Most of the code has been already implemented, only would need to implement that "extra condition" to avoid Excel from usign only the 15 digits.
Appreciated any help. If requested, I could try to implement the full code tomorrow morning (CEST Time)