Combine Cell Values of 2 Columns and paste into third One

I need to perform the following Situation

image

I need to Concatenate values of Column A and Column B and paste into the third one

Hi @Ishan_Shelke

Try this appraoch

  1. Read the excel and store in dt

  2. Loop through each row of dt

inside the loop do the follwoing

  1. use assign activity to assign the following

row(2)= row(1).toString+row(0).ToString

exit of loop, use write range to write the updated datatable dt

Hey!

Try this:

  1. Take one assign create one variable-> Type integer->Counter=1
  2. Read the excel using read range ->Output as → dt
  3. Use For each row in datatable and pass the dt
  4. Take one write cell activity in the for each row
  5. Value as
CurrentRow(0).ToString.Trim+CurrentRow(1).ToString.Trim

In the range field mention

"C1:"+(Counter.ToString)+1

Take one assign next to the Write range inside the for each

pass the expression like this

Counter=Counter+1

Regards,
NaNi

Hi,

You can do the following
Read excel using excel application scope

  • write cell - “=concat(A2,B2)”
  • auto fill range source on column c

Can you post a screenshot of the auto fill range activity I am not exactly sure what to put in there

Getting confused as in what to put in the source and destination range

I don’t have a destined number of rows they vary each time I run the bot So getting confused here a little bit

Hi,

U can use this

YourDataTable.rowcount

to get number of rows

"C2:C"+dt.rowcount.tostring

Capture

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