How to print the string in next row if it ends with time

I have a table like this in Excel :


What I need to do is if the row data ends with time I need to move that row into the next column

Required output :


Hi @Ishan_Shelke ,

Follow below steps:

  1. Read your file and use a for each row activity.
  2. Then put a If activity inside For each with condition as below,
    above expression gives you Boolean type.
  3. And in then part of If activity use assign activity and write as below,
    row("Your Second Column Name") = row("Message").ToString

Hope this might help you :slight_smile:



Try as below

  1. Use a read range activity and read data into datatable dt…
  2. If second column is missing then use add data column activity to add a column
  3. Now use for each row in datatable activity on dt
  4. Inside loop use if condition with System.Text.RegularExpressions.Regex.IsMatch(currentrow(0).ToString,"\d{2}:\d{2} [A-Z]{2}")
  5. On the then side use assign with currentrow(1) = currentrow(0).ToString

Hope this helps


build a datatable where one colmn is for message another for time.
for each row first_dt MatchFound go and add datarow to outputDt-{Currentrow(0).tostring,Currentrow(1).tostring.trim}
else add it to {Currentrow(0).tostring,“”}

Hope this helps

exxx (69.1 KB)