Hello I think I may have found another solution. Let me explain what I'm trying to do. Let's say my Excel table looks like the one below. I would like to get the average of all the values for Department A. The 1st column is Department and the 2nd column is Quantity. For example, the average for Department A would be (4 + 6 + 10) / 3.
Therefore, I need some type of loop. I wrote this small piece of code:
(I just added the average function while in this post so i don't know if it's completely right)
The Department column in my Excel file is column 2 and the Quantity value is column 6.
I received some Errors. Most of it was marked red.
A 4
B 7
C 3
D 5
________________________________
A 6
B 1
C 9
D 5
_______________________________
A 10
B 5
C 3
D 4
I used some of your code that you wrote in the previous post, but I only get the value for the 1st Department A and not the other Department A values so i decided to write the above code.
Bookmarks