Copy value from one column to another column

I have to apply filter in Column Subject , If Column Subject has value other than English ,I have to paste values in Column Subject same as of Column Marks .

@Ananya1

Are you reading data from xlsx file?

Yes from Excel

@Ananya1

Can you share excel screenshots what you want?

Capture
Marks column should have same value as Column Subject have like Hindi ,Maths,Social,Science
This will applicable only is Subject is Hindi Maths Social,science

and for English value. the value should be 0 in Marks column

Capture

output should be like this

@Ananya1

please find the sample.

Main.xaml (12.4 KB) Marks.xls (16 KB)

Regards
Anand

HI ,

copy value from one column to another.xaml (7.8 KB)

Apply if formula
Or
Use read range then for each row for column Marks
Say
If row(“Subject”).ToString=“English”
Then
Row(“Marks”)=“0”
Else
Row(“Marks”)=row(“Subject”).ToString

There are 80k rows which will take lot of time

Then u can directly use Formula for this say

=IF(A2=“English”,0,A2)

Use this formula in B2 and then using Read Range, count the rows say

Count=Dt.Rows.Count+1

it will give you count
then use Auto Fill Range in that pass Sheet Name and Source Range will be B2 and destination Range will be **`

“B2:B”+Count.Tostring

`**

image

First use Read Range activity to read your excel worksheet and Use for each loop(helps to iterate the rows in your workflow) and inside for each loop use if condition
If row(0).ToString = “English” then row(1) = “0”
Else row(1) = row(0).ToString
Hope this helps you,Happy Automation!!

What about other subjects? for rest there should be same value

For the rest whatever the subject is there will be write as u can see in ss

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