Categorising items in Datatable Excel

I would to scrap the stocks and their prices of a mutual fund from a website.

image
So far I can only get this(a):
stock name stock price mutual fund name
company1 20
company2 30
company3 40
company4 50
company5 60
company6 10
company7 20
company8 30
company9 40
company10 50
company11 60

image
But I would like to get an excel list like this(b):
stock name stock price mutual fund name
company1 20 mutual1
company2 30 mutual1
company3 40 mutual1
company4 50 mutual1
company5 60 mutual1
company6 10 mutual2
company7 20 mutual2
company8 30 mutual2
company9 40 mutual2
company10 50 mutual2
company11 60 mutual2

My intention is to group/categorize the stock names according to the mutual fund name that they are under.

This is my workflow for (a):



The 3rd picture shows how i wrote the stock name and stock price data into excel

I tried using the workflow in the picture below to group the companies according to the mutual fund name:

However, it gave me an error “Write Cell: The range does not exist.”

Do you have any advice on it? Thank you!

You must give the cell address like below-

“D2”

“D[RowNumber]” - you are missing the row number in the Write Cell Activity.

Regards,
Karthik Byggari

Thanks Karthik, the error is gone.

However, this is what i got:
image
stock name stock price mutual fund name
amazon 20 mutual1
apple 30
hp 40
dell 50
intel 60
samsung 10
LG 20
Huawei 30
Asus 40
acer 50
mediatek 60

How do i make it like this?
image
stock name stock price mutual fund name
amazon 20 mutual1
apple 30 mutual1
hp 40 mutual1
dell 50 mutual1
intel 60 mutual1
samsung 10 mutual2
LG 20 mutual2
Huawei 30 mutual2
Asus 40 mutual2
acer 50 mutual2
mediatek 60 mutual2

I kind of understand i need a loop to do this, but I am unsure of how to implement it

Thanks:)

When the value set to mutual 1, mutual 2 in the third column.
Any pattern or condition ?

Regards,
Karthik Byggari

This is how my workflow goes:
My workflow will read a list of mutual fund names from an excel sheet(eg mutual 1, mutual2,etc)
It will first input “mutual1” into the search element of a website.
Then it will scrap the data(stock name and stock price) and keep it in a data table
Afterwhich it will write it into an excel file

For condition, i want to set it as something like "all the data relating to the “mutual1” search name has to be named/grouped as “mutual1” category "

I hope I was able to explain it well

Okay. Got it.
After scraping the data, before writing into an excel file, set the value of column3 to your search value.

Assuming your data table has 3 columns - Stock Name, Stock Price, Mutual Fund Name

For each row in ExtractDataTable
     Assign Activity, row(2) = yourSearchValue
Next

And then write data table to excel.

Regards,
Karthik Byggari