Excel automation based on specific condition

Hi guys I had a small query. I have attached the input and output file pics. I need suggestions on how to do it.

@Palaniyappan @balupad14 @lakshman @HareeshMR @Shubham_Varshney

1 Like

This is bit tricky Buddy
Let me work on this and will let you know for sure
Cheers @vishal.kp

Sure :blush: thanks

Why don’t you do a pivot? @vishal.kp



1 Like

Yeah.but I want to automate in process. And how to use pivot .

We can use macro’s to attend that out :slight_smile:

For reference :slight_smile:
Creating Pivot Table in the background - #3 by samir


1 Like

How to apply it for my requirements.


PFA sample implementation for your case: vishal_kp.xaml (15.4 KB)

I tried to balance it between classical style and LINQ. Kindly note: related to the no of Plants it is dynamic. Does mean: if another plant would come into the picture the code is handling this as well.

Let me know your feedback and open questions


I tried running your code . It works perfectly fine…thanks a lot

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