How would i go about selecting a row to the left of any active cell. As far as column B
i tried this but it selects the whole row to the leftPlease Login or Register to view this content.
How would i go about selecting a row to the left of any active cell. As far as column B
i tried this but it selects the whole row to the leftPlease Login or Register to view this content.
Try:
HTHPlease Login or Register to view this content.
Jason
Please Login or Register to view this content.
Shijesh Kumar
http://shijesh.wordpress.com/
Thank you
Do you know how i would use it in this code
Month Column = 14 at this point (is Variable)Please Login or Register to view this content.
Forgot to say it needs to calculate from MonthColumn variable(14) back to column(B)
And give the total
Are you trying to create the correct SUM formula? If so, this may be what you are looking for:
HTHPlease Login or Register to view this content.
Jason
Im afraid the code didnt work
I need a total for columns "B" to the one before "MonthColumn"(variable)
And need rows 4 and 7-16 filled as shown in my macro
The amount of columns is dynamic rows are not. I tried xlToLeft and such but havent been successeful
George
Hi George.
Once you run the procedure I listed above, what are the formulas in the cells? What "didnt work" about the procedure?
Jason
Error 1004 Object Error on row
Please Login or Register to view this content.
It does add a total heading to row B4
When the error is presented, what is the value of MonthColumn? You can see this by clicking Debug, then hovering the cursor over the variable MonthColumn.
MonthColumn Is 12 at error
It pastes the Total heading in the correct place. which is a good sign. The rest should follow
I defined i As Integer Is this wrong may cause an object error.
George
Interesting... See if this works:
If not, is it possible you could post up a copy of your workbook?Please Login or Register to view this content.
Thats Great thanx, it worked successfully and added the column after the variable column number.
I forgot to mention the average column so i just updated that and it now works.
Than you for your timePlease Login or Register to view this content.
George
Glad it worked, George.
By the way, you should move the average formula after the loop, or it will insert the formula 9 times. (Move it between Next i and End With).
Jason
Yep i know what you mean didnt think about that
GeorgePlease Login or Register to view this content.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks