How to find the specific value count in excel

Hi Team,

I want to find today date count in each rows once found today date in anyone row then check the count of today date if today date count is 4 then skip that row , if today date count is less then 4 like count 1 or 2 or 3 then pick the first index value in particular row then print the log message and update Today date to last index of row in particular row.

Please anyone help me for this.

Input:

Expected Output:

Regards,
Raja G

Hi @Raja.G
Please follow below steps
1.use for each row
2.create intmatch count variable and assign value as zero
3. Inside for each row use for each and pass dt.Columns to loop the column
4. Use if condition to check date value match
Convert.ToString(row(item)).Contains(“01.01.23”) the increate the count as intmatch=intmatch+1
5. Use if condition intmatch after for each to check the intmatch<4 then follow 6 step
6.use one more foreach to loop datacolumn to identify which column is empty
7. String.isnullorempty(Convert.ToString(row(item))) if true the use assign activity row(item)="01.01.2023" then use break activity

Regards,
Arivu

1 Like

Hi @arivu96 ,

Working fine but empty cell not updated in today date please help me on this.

I have attached developed code and excel for your reference.

Excel_columnindex.zip (11.1 KB)

Regards,
Raja G

Hi @Raja.G ,
Happy New Year :slight_smile:
please refer below xaml files ( removed message box)
Main.xaml (19.3 KB)
Book1.xlsx (10.9 KB)

Regards,
Arivu

1 Like

Hi @arivu96 ,

Happy New year

Working fine, thanks .

One small changes require i want one particular row only entry the today date not all .

If i give input YYY check max count of 4 today date, if present then skip that row, else update today date, based upon the input first column.

if XXX i give input means check max count of today date if less than 4 today date then update today date .

Any possible output to same format in same sheet, if no means no problem

Input file:

Expected output:

Regards,
Raja G

you can use break after apply today date

use preserve format while reading the excel file

Regards,
Arivu

1 Like

Hi @arivu96 ,

Yes already there the same , but expectation not meet please help me on this.

Regards,
Raja G

Use if condition Convert.ToString(row("Name")).Contains("YYY"), please refer attached xaml file.

Main.xaml (21.8 KB)

Regards,
Arivu

2 Likes

Hi @arivu96,

Thank you so much working fine

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