How to merge four column values into a one column

Hi Guys, I have a excel sheet containing four columns and i need to merge the data into a single column from column2 to column4

For example…

Column1 Column2 Column3 Column4
123456 Cost NA NA
123456 NA Price NA
123456 NA Price NA
123456 NA NA Total
123456 Cost NA NA

Output Should be in this way…

Column 1 Column 2
123456 Cost
123456 Price
123456 Price
123456 Total
123456 Cost

Please let me know if anyone have idea on this…

@madhuraj4797 Will the input have Always 4 Columns? And Should the Output be Always 2 Columns?

2 Likes

Try Concatenate(A1+A2+A3+A4) to the Column 5 to Cell A5 and Autofill the same to the rest of the cells

1 Like

Hi @madhuraj4797,

I hope you are looking to marge all data present in 2nd, 3rd & 4th column into 2nd column.

If the above is true then please read your excel and store the data into a data table. Now use a for each row activity, keep the value of 1st column as it is.

After getting the values from 2nd, 3rd & 4th column use a Assign activity, which will merge the data from the above mentioned columns and replace NA with Null by using Regex.

Now you are ready to write your excel.

Thanks & Regards,
Apurba

2 Likes

@madhuraj4797

Concatenate strings in column2 , column3 and column4 and then use a String.Replace(" NA “,”")

2 Likes

yes…It was always four Columns

can you share me any sample file it would help me

Hi @madhuraj4797,

Surely, I will amke a workflow for you. May I have your excel please, so that I can help you quickly?

Thanks & Regards,
Apurba

sry… i cant share any files it was restricted…

Sry… I cant share any of the files

Yea @madhuraj4797, I understand your point.

I’m going with my file.

Thanks & Regards,
Apurba

Hi @madhuraj4797,

Please have a look on the file -
Forum_madhuraj4797.zip (10.4 KB)

Thanks & Regards,
Apurba

3 Likes

thanks bro… It helped me…!! Cheers

1 Like

Hi @madhuraj4797,

Always most welcome. :slightly_smiling_face:

I feel happy to help you.

Kindly mark that post as solution, which you think as solution to close this topic.

Cheers!

Thanks & Regards,
Apurba