Write Data in a column with random number of rows

How to write data in a column if the amount of rows inserted is random?

Read the excel into data table using Read Range Activity. So the data will be in datatable.
So to get the number of rows in your excel,
numRows = DataTable.Rows.Count

What does that do? I didnt get it though.

Loop thru each row of Data Table.

If you know the IDs (fixed) instead of IF, you can use the switch activity.

e.g., SWITCH ID

Case “1234”:
Case “3344”

Assign Activity, intIndex = 1
For Each row in DT
         intIndex = intIndex + 1
         Id = row(1).ToString
         if id == “1234”
                  use Write Cell Activity, Range -> “A” + intIndex, Value = “TA”

Do u mind doing it in UIPath and screenshot?