Compare rows but need exclude 010106 & 010107

Hello all,

I compare 6 same characters but need to exclude 1 case: 010106 & 010107 (not different). How can i do that

Left(RowPhu.Item(1).ToString,6)=Left(DtPhu.Rows(idx+1).Item(1).ToString,6)

Hi @anh.nguyen

How about this expression?

Use If activity

Currentrow("Column Name").Tostring.Equals("010106") or Currentrow("Column Name").Tostring.Equals("010107")

Regards
Gokul

2 Likes

Can i combine this if condition ?

Left(RowPhu.Item(1).ToString,6)=Left(DtPhu.Rows(idx+1).Item(1).ToString,6)

Yes @anh.nguyen

You can help me combine your condition with my condition

Left(RowPhu.Item(1).ToString,6)=Left(DtPhu.Rows(idx+1).Item(1).ToString,6)

Currentrow(“Column Name”).Tostring.Equals(“010106”) or Currentrow(“Column Name”).Tostring.Equals(“010107”)

@anh.nguyen

Try like this

Left(RowPhu.Item(1).ToString,6)=Left(DtPhu.Rows(idx+1).Item(1).ToString,6) And Currentrow(“Column Name”).Tostring.Equals(“010106”) or Currentrow(“Column Name”).Tostring.Equals(“010107”)
1 Like

my mean, i compare row 1& row2 with 6 first character but if see 010106, 010107, it always equal.

Left(RowPhu.Item(1).ToString,6)=Left(DtPhu.Rows(idx+1).Item(1).ToString,6)
image

this expression not run

Left(RowPhu.Item(1).ToString,6)=Left(DtPhu.Rows(idx+1).Item(1).ToString,6) And Currentrow(“Column Name”).Tostring.Equals(“010106”) or Currentrow(“Column Name”).Tostring.Equals(“010107”)

@anh.nguyen

you mean skip 010106 / 010107?

1 Like

with conditions as below, 010106 and 010107 will be different

Left(RowPhu.Item(1).ToString,6)=Left(DtPhu.Rows(idx+1).Item(1).ToString,6)

but I want if condition meet 010106 and 010107, it not different, still equal

@anh.nguyen

(Left(RowPhu.Item(1).ToString,6)="010106" and Left(DtPhu.Rows(idx+1).Item(1).ToString,6) = "010107") Or Left(RowPhu.Item(1).ToString,6)=Left(DtPhu.Rows(idx+1).Item(1).ToString,6)

1 Like

almost exactly, at RowPhu.Item(1) dont know "010106 or 010107 so i have to add more condition ?

(Left(RowPhu.Item(1).ToString,6)=“010106” and Left(DtPhu.Rows(idx+1).Item(1).ToString,6) = “010107”) Or (Left(RowPhu.Item(1).ToString,6)=“010107” and Left(DtPhu.Rows(idx+1).Item(1).ToString,6) = “010106”) Or Left(RowPhu.Item(1).ToString,6)=Left(DtPhu.Rows(idx+1).Item(1).ToString,6)

1 Like

((Left(RowPhu.Item(1).ToString,6)="010106" or Left(RowPhu.Item(1).ToString,6)="010107") and (Left(DtPhu.Rows(idx+1).Item(1).ToString,6) = "010106") or Left(DtPhu.Rows(idx+1).Item(1).ToString,6) = "010107")) Or Left(RowPhu.Item(1).ToString,6)=Left(DtPhu.Rows(idx+1).Item(1).ToString,6)

1 Like

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