Hi All,
I am using sumproducts in VBA and I have below code:
instead of AI!$AY$2:$AY$366 in above code I want to refer to the last column of sheet AI. How can I change that in above code?![]()
Please Login or Register to view this content.
Thanks,
Hi All,
I am using sumproducts in VBA and I have below code:
instead of AI!$AY$2:$AY$366 in above code I want to refer to the last column of sheet AI. How can I change that in above code?![]()
Please Login or Register to view this content.
Thanks,
Last edited by hanif; 07-22-2016 at 06:54 AM.
If anyone know any other way please say. I can upload the spreadsheet if helps understanding better.
can you use a named range for the last column ?
Hello Hanif
Try something like that (Not Tested)
![]()
Please Login or Register to view this content.
< ----- Please click the little star * next to add reputation if my post helps you
Visit Forum : From Here
Thanks Yasser,
It does look very sensible. I was thinking the same idea but didn't know how to interprete it into vba. I am getting "Application-defined or object-defined error" message on below line. Any idea how can I fix that?
Thanks,![]()
Please Login or Register to view this content.
Sure you didn't get the lower case "L" mixed up with the number 1?
They look alike when written.![]()
Please Login or Register to view this content.
Please do not quote when you reply! Just reply will do.
I have tested it and it works.
Also use Option Explicit with the code to spot out a typo
![]()
Please Login or Register to view this content.
That's the only thing I see that would produce that error. What about in your Dim statement?
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks