Re: $$Excel-Macros$$ Shorter way of getting sum of each column using VBA

2014-08-06 Thread Jef Gorbach
presumably you want all the totals on the same line, so really just need to find the bottom of the first column, k The array is the column# you want totals for. endrow=cells(65536,3).end(xlup).row for each col in array(11,15,16,20,21) cells(endrow+1,col).value=worksheetfunction.sum(columns(col)

Re: $$Excel-Macros$$ Shorter way of getting sum of each column using VBA

2014-08-06 Thread Pramod Singh
Hi Danj, PF below is code. i = Sheet1.Cells(Sheet1.Rows.Count, "K").End(xlUp).Row Sheet1.Range("K" & i + 1).Value = WorksheetFunction.Sum(Sheet1.Range("K1:K" & i + 1)) change columns in K for *O, P, T, U, and V...* Regards Pramod On Thu, Aug 7, 2014 at 8:50 AM, 'DanJ' via MS EXCEL A