How to selectively find and copy data from excel

Hi,

I have a file which contains number of test results of material with a date. I want to find the datewise data and copy that into new excel file .
The data is in following format

I tried to search date and then use hotkey’s for copying but didn’t work as there are irregular blank cells. Also tried to use while but wasn’t successful. Please help me out.

Hello,

If you only need to keep the rows where the date is, you can use Read Range, create it as a data table and then filter to Keep Rows where the column Date is not empty. Then write that DT into the new Excel File.

If that is not the case, please let me know which rows relate to the date.

Hi SJonsson,
Actually i want to copy the all the rows till next date start . The data is arranged datewise but all the rows doesnt have date assigned in A column

Hi,

Would there be a possibility to get the Excel sheet with the correct date in the cells or is that something which you would want to include in the process?

If you want to include it, read the range and create DT1. Filter on the non empty cells and create a DT2 and assign the first value to a string variable.

Use For Each Row within DT1, use an If activity to check if the next cell is empty. If yes write the value from DT2.
If not empty get the next value from DT2 and assign that one to the string variable. That way it will use that value to fill in the empty cells with the correct date.

Here you can get an idea with the If activity.

Then you can filter it or write it according to what you need in the other Excel sheet.

okay but how to read that specific data. I am stuck there only

Hello,

Read the whole excel sheet, so Sheet1 and range “” or “A:F” if you want to stop at count(AST MD1907)

image