How to fill up column with a derived value


#1

Hi all,

Using RPA, i have managed to extract the value “55” for use in Column E.

For the first two rows, i have extracted those data before extracting Column E. How do i go back to fill up the two rows with “55” in their respective Column E?

Thanks!


#2

can you please elaborate what issue your facing…

you said u have extracted value from external page or database etc, which you have added to column E

**

  • For the first two rows, i have extracted those data before extracting Column E. How do i go back to fill up the two rows with “55” in their respective Column E?

**
i dint understand this…


#3

so i want ‘55’ to appear in the first two rows’ Column E as well :slight_smile:


#4

if this is how the script runs by leaving first two rows in column E to null then you can do these things…

  1. if you know in advance what value will come to column E, then you can assign the values to those columns using cell[1,E] =variable name

  2. if you are not sure about the value ur going to receive then you need to loop back to row 1 to verify if column E is null, then you can assign values to the missing cells.

i have a question here, if you are generating all the values to the remaining columns why its not possible to put the values to col E in the beginning. do you have any dependency on the values generated for this columns


#5

Yes i have some form of dependency.

In my raw data form, data for Column A and Column E shares the same column (Column 1 in my raw data).

Hence, i used the if function.
so to generate the first 2 rows, i used the if function to derive that
and now, I want to put in the value of Column E for the first two rows.

How can i do that?

[EDIT]
what i am trying to do is basically putting an extracted value into a column for all my rows


#6

Do you read the excel into a datatable?
If so you can just do a for each row
Assign row.item(4) = value (i.e. 55)


#7

cuz i kinda derived the value through IF function so is it possible for me to use that value out of the IF function?


#8

Do you have an example of the IF function / output - do you assign it to a variable?


#9

yes so within the if function, i assign this value i want to a variable.

However, when i want to use it to attach to the other rows, i am not sure how to do that as it always appear as empty.


#10

Do you have an example of your code?


#11

Hi! managed to solve this by using the “Add Data Column” function :slight_smile: and i set the default as “55”