Need to get the hrs value to calculate the total hrs

Need to get the hrs value to calculate the total hrstest1.xlsx (8.1 KB)

You can simply read the excel using read range from C9:U38 as the data is there in that range and then you will get the hours while looping using row(“Hrs”).tostring @RachelN


the range is dynamic.Sometimes it will start at range A itself.

Then it is difficult to find the values @RachelN

You can do some more steps to find it

  1. read range to get the last row of excel
  2. Loop through the data table and check which row has the value date and store the index in a variable
  3. Then use that to do remaining steps as above

But this is very complicated I hope . Please check if you have any alternative

Hi @RachelN,

Please try as per below image: inside the Excel Scope activity.

WB- Workbook variable.

In Invoke method, you need to pass parameter 1. Sheet name and 2. False (default)

By this you will be able to get the last used row. You can use this as range.

Sasikumar K

Hello @RachelN

You can do this easily using Linq
I have Create three queries first to get the column name containing Hrs and than the second query will remove the Blank values and will only give you a list of Values and the third will calculate the sum of all values.

Check this workflow for better understanding.

Rachelhrs.xaml (8.8 KB) test1.xlsx (12.6 KB)