Sumif in Uipath

Hi @Satish_Ch

Could you explain ur query with screenshots , could not getting the ur query ?

Regards,
Nived N

2 Likes

i need to calculate = sumif(‘Final Report’!D:D,‘Disallowed’!B11,‘Final Report’!AL:AL)

Here final report and disallowed are two sheets in one excel…i need to write calculation in disallowed sheet in G column

so you need to copy the formula to all cells under G column upto data resides?

You can Use write cell for writing formula directly in Cells of G column.
Or You can use for each row and apply this formula for given column.
Or you can directly use macro code to apply formula.

Yes Nived

@Satish_Ch
Then use write cell as specified by @ImPratham45

better to use invoke code with microsoft interop excel it will fasten up the speed of processing

We are not allowed to use invoke code.
Could you tell me how to write this with linq query if possible

We cant use for loop as this will take time and macros as suggested by client not to use.

Could you let me know if we can write linq query for this.

@Satish_Ch

Try VBA

link : Apply formula to entire column with a macro in VBA | MrExcel Message Board

Will try

1 Like

Its not working.Can u help me with the linq query for this.

Does anyone provide me the linq query for this.

Could you help me how to write this directly into writecell
And how to write it if i use datatables to store first

Can you share what you wrote in given screenshot. As i am not getting any error

image

I cant use hardcorded values like this …so i will be storing it in datatable first…finalreport as dt1 and disallowed as dt2

For that i need syntax

whatever you wrote in write cell please give me that string

Screenshot is having the string bro already

where Finalreport is one sheet name and disallowed is another sheetname

store them in String variable not in Datatable

1 Like

Hi @Satish_Ch,

That is a myth.

Standard for each or for each row are not slow activities at all. Please review the results of the test in this thread from @postwick There is no need to try to avoid For Each loops on large amounts of data

In your case, you have to educate your customer and walk them through why it is advantageous to choose standard UiPath activities. There are numerous advantages of using standard activities. To name a few, code maintenance, code review and easy of code upgrades in the future.

If it is a strict requirement (only use linq), the tech lead or the solution architect should have intervened and informed the customer that there are no performance advantages by only using linq query. This would have ensured you as developer would not be stuck with a problem which a simple for loop could have fixed (without affecting performance).

1 Like