Hi,
I has a worksheet which gets data for a week range. My coloumns are fixed i.e one week range. But Rows can be differed and i need to calculate avg and based on avg i need to color the rows.
My format is like this :
A B C D E F G H
1
2
3
4
5
X
H is the coloumn where i take the avg. I have written VBA code by hard coding the row value, but in general it will vary. I am not sure how to find the last row and then calculate Avg.
I am adding the code which i did for constants Rows.
![]()
Please Login or Register to view this content.
Could you please help me out in writing VBA code for getting last row and do the calculation instead of hardcoding the row range.
Thanks & Regards,
Pradeep
Bookmarks