sum last rows
Put this formula on your "other" sheet and copy it down...
=SUMPRODUCT((COLUMN('Data Sheet'!1:1)MAX(COLUMN('Data Sheet'!1:1)*('Data
Sheet'!1:1<""))-4)*('Data Sheet'!1:1))-LOOKUP(2,1/('Data
Sheet'!1:1<""),'Data Sheet'!1:1)
Note: Change my 'Data Sheet' to the name of your sheet with the columns you
are adding (use apostrophes around the name if it contains spaces, otherwise
they are not needed). Also, all those 1:1 refer to Row 1... if your data
starts on a different row, then use that row number in place of the 1s.
For future reference, it is always a good idea to tell us sheet names along
with row and column references so we don't have to use made up names and
references (easier for you too as you wouldn't have to change anything if we
could use your actual names and references).
--
Rick (MVP - Excel)
"geebee" (noSPAMs) wrote in message
...
hi,
yes i meant to the right. so if i have columns 1 2 3 4 5 and 6 i want the
sum of columns 3 4 and 5, for every row. i want the sums in a column in
another sheet in which we have different names in each row... so i want
the
column sum to show up for each name. i guess i could have the sums in the
same sheet the columns are in, and then do a vlookup in the other sheet to
get the column totals for each name. how do i go about getting the totals
for each row?
maybe im not getting it... or its getting late for me.
thanks in advance,
geebee
"Rick Rothstein" wrote:
Two questions...
1. When you said "to the right", did you actually mean "to the LEFT" of
the
very last column? That is, for any given row, if you had data in columns
1,2,3,4,5,6... did you want the sum of columns 3,4,5 (ignoring the data
in
column 6)?
2. Where did you want these row-sums at? On the worksheet? In an array in
memory? Somewhere else?
--
Rick (MVP - Excel)
"geebee" (noSPAMs) wrote in message
...
hi,
i have lots of columns. columns are added each month. is there a way
to
dynamically sum the last 3 columns to the right of the very last column
for
each row?
thanks in advance,
geebee
|