How to write formula in excel?

I want to write formula In rows35 column C,D, F and H
Formula = value to row33 / date last row have data * date end of month

output.xlsx (11.6 KB)

Guide me please.

Use Excel application scope and write cell activity…

1 Like

@Pravin_Patil1 I want to change 12 or 28 follow data in excel.

This is different question…Where we need to prepare formula first…

  1. For this you need to read the file using read range from A4 with deselecting headers property of read range.
  2. Then loop through the data table and see if values in B,C,D columns are empty then get date from COL A and read the date(dd)
  3. To get last day of month use DateTime.DaysInMonth(date.Year, date.Month) this formula…

Try this from your side and let us know if you get any issue…

@Pravin_Patil1 Now I assign month = today-3 day
How to get value last day of month?


Please guide me.

Now.AddDays(-3).DaysInMonth(Now.AddDays(-3).Year, Now.AddDays(-3).Month)

@Pravin_Patil1 I find first row that blank , it alert 12 , 13 ,14 until 30.
I want to show 12 only.

Please guide me.


use break activity to exit loop when condition meets…