Excel previous row value

Dear all,

I am trying to get the previous value of “A1” column per each row. Currently, I can’t achieve that.

|Site Code|Site Name|Delivery date|Item Code|Quantity|

|C0001101|Ye Moe|2/9/2020|A00002|14|
|C0001101|Ye Moe|2/9/2020|A00003|28|
|C00017|Test Customer|2/9/2020|A00002|4|
|C00017|Test Customer|2/9/2020|A00002|6|
|C00017|Test Customer|2/9/2020|A00001|9|

The scenario is if the Site Code is the same, that code will not be re-entry again. I am using for each row and “if” condition in my activity but i need to get that previous Site Code in validation condition.
Let me know how can i achieve that one. Many thanks.

image

@prakaz25

If you are trying to remove the rows with respect to the column “Site Code”, use filter data table activity.

Hi @Htwe_Ko_Ko_Wynn

Better remove the Duplicate rows from Datatable & create temp variable as empty by default. In for each row you can compare every iteration value then take only not matching row

can u specify the range like for example a3:c3

Dear All,

That i want to know only the previous data of “A1” Column. For example, if the Site Code is changed or not equal to previous site code, my program will entry new data in new form.
These C0001101, C0001101 are in one form.
the next C00017, C00017, C00017 will be in new form.

Is there any idea how can i get that

Dear Prakaz,

I tried to remove duplicates, but not working though.

Hello @Htwe_Ko_Ko_Wynn,

You can use following steps to get it done. (All steps should be added to For Each loop)

Step 1: If condition - Add if condition to check if preSiteCode = row(“Site Code”).ToString
Step 2: Then: Perform some action
Step 3: Else: Enter new form data
Step 4: Assign Activity - preSiteCode = row(“Site Code”)

Basically we are preserving old value in temp variable here.

Hope it helps.

Hi Bhavik,

Sorry for my late reply, i am not still clear on it. If it is possible can you please show me as screenshot that if u are available. Many thanks.

You workflow should look something like this:

You may have to twist a bit but it should give you a good start.

Thanks Bhavik,

Let me try that.

i still facing issue Bhavik can you please guide me more?

here is my testing sequence. Let me know any issue about it. Thanks.Sequence (1).xaml (9.5 KB)

Hello @Htwe_Ko_Ko_Wynn,

Please find attached updated workflow. Sequence.xaml (8.4 KB)

Many thanks to Bhavik,

This logic works to get last value of the cell. Problem is solved!

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.