Removing DataRow that validate via month is either this month or previous month

Hi Guys,

Can i check it out that i have an excel with column call TERMINATEDATE looks like this

image

if there is a date inside the column and the month is = current month or previous month i want it to be remove i am using filter datatable function but have no idea how do i do it
eg. this month is march so for the month of March and february will be filter out by the system

image

Thanks for the assistance

@beyondx Do you want to remove the Whole Data Row which has the particular Date?

Can you send the sample excel file??..

@supermanPunch yes thats correct to remove the whole datarow that has the date which hit the criteria such as this month and previous month

Hi Manish afraid that wont be able to share the excel due to confidential information thanks

@beyondx Ok, Can you Show us the Value of the first row of TerminateDate Column in a Message Box by using Read Range and For Each row, I just need to Check how the VALUE Appears

Hi Superman it look like this

image

@beyondx Can you provide a Sample Data Excel File with only that Column as Data , It will be much easier to provide a Solution in that way :sweat_smile:

1 Like

@supermanPunch hi this is the sample excel thanks alot for the helpSample Excel.xlsx (10.4 KB)

@beyondx But in the Screenshot you have provided, There are some empty cells in the Column as well, What do you want to do for such rows ?

hi @supermanPunch those with empty cell will be kept and nothing will be done to it thanks

@beyondx Check this Workflow :
DeleteRowsMatchingCondition.zip (9.7 KB)

First Check the Sample Excel File.
Then Execute the Workflow.
Check the Excel File Again, Output will be in a new Sheet Created called “Output”.
If this is what you needed Check with your File Data if it is Working or not and Revert back.

The Linq Query used is Quite Big as I am Testing for Errors, So errors Shouldn’t Arise but if it does let me Know :sweat_smile:

@supermanPunch thanks for the solution i think its work thanks so much for the help

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.