Skip to main content
Solved

How to get the Matching Row in Excel When Using Multiple Column Loops in A360

  • November 10, 2025
  • 3 replies
  • 52 views

Forum|alt.badge.img+4

Hi everyone,

I have a question. I would appreciate it if someone who knows answer.

 

I have an Excel list with a variable number of rows (sometimes over 1000). I want to loop through each row and check four different variables against four specific columns:
Variable1 → Column A
Variable2 → Column B
Variable3 → Column C
Variable4 → Column D


If all four variables match the values in their respective columns, I want to identify which row matches and retrieve the number row of that row.

Currently, I am using separate loops for each of the four columns, storing each cell value in a list variable, and then using IF > List Variable condition to compare. This works, but I cannot get which specific cell/row was matched.

 

Thanks in advance

Best answer by Padmakumar

Hi ​@ufuksavas,

 

As per the given details, this is very straightforward, and you can achieve this using a single loop.

  1. Open Excel
  2. Loop through the columns (The record variable produced from the loop will be holding one full record of row during each iteration, so by using either the column name or the index, you can specify the value of a specific column.)
  3. Using an IF condition, compare the 4 values that you are looking for
  4. If any match is found, retrieve the row details by using the Get row number action with the Excel advanced package.

 

Note: I hope you are talking about only 1 Excel file here. If not, multiple loops must be involved.

3 replies

Padmakumar
Premier Pathfinder | Tier 7
Forum|alt.badge.img+15
  • Premier Pathfinder | Tier 7
  • 1170 replies
  • Answer
  • November 10, 2025

Hi ​@ufuksavas,

 

As per the given details, this is very straightforward, and you can achieve this using a single loop.

  1. Open Excel
  2. Loop through the columns (The record variable produced from the loop will be holding one full record of row during each iteration, so by using either the column name or the index, you can specify the value of a specific column.)
  3. Using an IF condition, compare the 4 values that you are looking for
  4. If any match is found, retrieve the row details by using the Get row number action with the Excel advanced package.

 

Note: I hope you are talking about only 1 Excel file here. If not, multiple loops must be involved.


Forum|alt.badge.img+4
  • Author
  • Navigator | Tier 3
  • 12 replies
  • November 10, 2025

Hi ​@ufuksavas,

 

As per the given details, this is very straightforward, and you can achieve this using a single loop.

  1. Open Excel
  2. Loop through the columns (The record variable produced from the loop will be holding one full record of row during each iteration, so by using either the column name or the index, you can specify the value of a specific column.)
  3. Using an IF condition, compare the 4 values that you are looking for
  4. If any match is found, retrieve the row details by using the Get row number action with the Excel advanced package.

 

Note: I hope you are talking about only 1 Excel file here. If not, multiple loops must be involved.

 

Thank you very much. I guess I just couldn’t see the forest for the trees. 😀


I had originally created separate loops for each column, but thanks to your suggestion I solved it using a single loop.
for Step 4 (Get row number)  I created a number variable and incremented it by +1 in each iteration. When the match occurred, I used that variable to get the correct row number.


Thanks again for the clear explanation!


Padmakumar
Premier Pathfinder | Tier 7
Forum|alt.badge.img+15
  • Premier Pathfinder | Tier 7
  • 1170 replies
  • November 11, 2025

Hi ​@ufuksavas,

 

As per the given details, this is very straightforward, and you can achieve this using a single loop.

  1. Open Excel
  2. Loop through the columns (The record variable produced from the loop will be holding one full record of row during each iteration, so by using either the column name or the index, you can specify the value of a specific column.)
  3. Using an IF condition, compare the 4 values that you are looking for
  4. If any match is found, retrieve the row details by using the Get row number action with the Excel advanced package.

 

Note: I hope you are talking about only 1 Excel file here. If not, multiple loops must be involved.

 

Thank you very much. I guess I just couldn’t see the forest for the trees. 😀


I had originally created separate loops for each column, but thanks to your suggestion I solved it using a single loop.
for Step 4 (Get row number)  I created a number variable and incremented it by +1 in each iteration. When the match occurred, I used that variable to get the correct row number.


Thanks again for the clear explanation!

 

Considering the size of data that you are handling, you may switch to either the DataTable or Database package instead of Excel Advanced for a better execution speed.