Comparing 2-4 rows in the Google Sheet

Hello everyone!

My name is Dima and this is my first time here. Those are unsolvable tasks for me, so I decided to ask for help from Make Community (I heard it is big!!!).

I have 2 questions that I personally can`t find answers to. I am creating a Telegram chatbot with only one function - providing the info about the car part, when its number is sent by user.

Here is the example how my google sheet looks like.

Issue 1:

This information is gathered from different warehouses into 1 sheet I receive. There are situations, when the part number is equal to another one, and brands can be similar/different. Here is an example of similar ones:

I have about 30,000 rows in this sheet, so possible there are even more rows with this number and different/similar brand.

Question: How I can differentiate them into 2 different branches? So in branch 1, I would work with those that have similar brand and those who have different brand would be sent to the another branch.

What I have tried for this issue:

I have chosen 2 filters. I have tried to use an iterator and then compare the iterated value of the brand name array to the value of the “brand” column from “Google Sheet Search Rows” module. But they all go to the “they are equal branch”, because I can`t choose to compare every single bundle to the first bundle from an iterator.

Issue 2:

After I have some equal bundles on my second branch, I want to work only continue with the 1 row that has the highest value of “Price” column. If even price is the same, it would also choose only 1 of them.

The task looks basic but my solution just doesn`t work :sweat_smile:

What I have tried for this issue:

I have tried to use Google Sheet Search Rows module once again in this way:

Here, I was supposed to get 1 row with the highest “Price” value. And guess what? :grin:

To be honest, I don’t know what’s wrong with me, but it is what it is. :smile:

I had also thought about the numeric aggregator, “max()” function or something similar, I have even been thinking about creating a variables from the values I got and compare them somehow. I haven`t tried these ones, but maybe they will push you to “unravel this mystery of humanity”.

Thank you for paying attention to this issue! I hope that your experience can help us solve these issues. Have a nice day!


I discovered, that Google Sheet filter would actually work (this one for Issue 2), but I used it incorrectly. But it would for only work if Issue 1 would be solved, so than I can continue with filtered Search Rows module.

Still need help with the first one :pray:

1 Like

Hello :blob_wave:,

From your description, it is difficult to say whether it will work for your case but you might try to aggregate all rows into the array and then use “array operators” in the filter.

e.g. to check whether the array contains (or does not contain) a specific brand name.
Or whether the array after deduplication has a length of 1 (which means all brand names are the same) or more than 1 (multiple brand names).

The idea is to compare all bundles with one specific value.

I hope it makes sense.

Cheerio :cat_roomba: