Variable selects last row when in 'For Each Excel Row… ’
Hi, I have a list of numbers in a column in Excel Sheet2 and I’m trying to iterate through each row getting the number into a variable that I then use on Sheet1 to filter. However I can’t get the variable to select the first row number, it always selects the last. It has NEVER selected the first. If I delete the last number in the Order column then it will still select the last number.
I have a Select Variable set for Order column below in a For Each Excel Row. I expected it to pick up the first row number 8162235 but it always pick up the last number no matter what the number is or how many rows I have in the column.
from screenshot looks like only assign is present in the for loop…if so…by default only last value will be stored as once the for loop completes the value will be the last one as the last iteration is for last order number
you can to do all your tasks inside the for loop only then for each iteration number will change
Hmm this is in a Do While loop, the above is the first process. I’ll add the rest of the process in. I think I have already tried this but will try again… Thank you!
Please explain what you are trying to do…as this is how the current one works…
do while one iteration and for loop all iterations always…as it is inside do while…so have only one loop if you need to run both loops only once and use logic accordingly…
as of now…as explained it will always save only last…as you are rewriting from the first
I have a spreadsheet Sheet1 which has a list of orders in Orders column and tracking details in Shipping column. This is one Order to many Shipping lines.
I copy the Orders column to Sheet 2 and delete duplicates.
I then save the first order number from Sheet 2 into a variable to filter Sheet1 Order column
From that one Order I then copy the many Shipping lines to Word
All the lines from the Word doc are then pasted into another application under the Order number.
Numbers 1, 3 and 4 are all working. I just can’t get number 2 to work selecting the first row on Sheet2 in the Orders column.
As per explanation looks like the second use excel needs to be inside the for each row in excel activity and change the reference to excel2 and use it…then for each row it would be filtered and all steps are performed