Please help me with the task.
I have a table with two tabs that I need to collate and record the values (1 and 0) in the second tab.
So, if according to the “Code” there is a value “v1” in the first sheet (s1), then on the intersecting cell on the second sheet (s2) we set 1, if not, then 0.
On the first sheet, “v1” is shown in a column, on the second sheet, in a row.
The values in “v1” and the “Сode” will sometimes change, there can be much more columns as well as “v1” rows.
Attached example and screenshot.
and what should be the result:
noname.xlsx (10.8 КБ)
Hope the following sample helps you.
Sample20220513-1.zip (19.5 KB)
Thanks for the quick answer, but I have a problem with the dictionary (If: The given key was not present in the dictionary.), maybe it is a character limit (I noticed that 9993 characters were written to the “dict” variable. And not all necessary data is stored in a variable)? To compare data between two worksheets, you can only use the data and columns “Code” and “v1”. In my table on sheet “s1” there are 1029 rows of data (about 100000 characters, not counting those that are not needed for comparison). And on sheet “s2” there are 120 rows and 37 columns (17000 characters). But the size may change.
Is your datatable is same format with the above sample?
It might be needed to modify argument of Skip method, if not same format.
The format is slightly different and I changed Skip to 5. But could it be a problem with the type of the variable “dict”?
Can you share your input files, if possible? It’s no problem if small dummy data even if issue is reproduced.
Thank you for your time. The file is in the attachment, but the robot still works out. Unfortunately, I can’t attach the original file.
There are much more non-repeating values in my file, but physically it is difficult to come up with so many.
But I don’t fully read sheet 1, here are the screenshots:
In my environment, the above data works well. Can you try the following?
Sample20220513-1v2.zip (45.2 KB)
And it can read sheet correctly as the following. The above is for limitation of debug window.
Thank you very much for your reply and your time. The same error remains, I’ll try to figure it out again. If it doesn’t work, I’ll write.
I checked the number of lines, it displays correctly.