Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,124
Default sum last rows

Tested and it missed the last column

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Rick Rothstein" wrote in message
...
Just a quick note to say my newsreader broke the formula apart at
(required) blank spaces. Here is the formula manually broken apart to
avoid that...

=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)

--
Rick (MVP - Excel)


"Rick Rothstein" wrote in message
...
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






Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Auto extract data & inserts rows additional rows automatically Meeru Excel Discussion (Misc queries) 3 September 9th 09 01:46 PM
Code for Excel 2007 to hide rows based on sum of several rows not ina range Joe Gardill Excel Programming 2 August 29th 08 03:53 PM
"Add/Remove Rows Code" adds rows on grouped sheets, but won't remove rows. Conan Kelly Excel Programming 1 November 16th 07 10:41 PM
Copy rows of data (eliminating blank rows) from fixed layout Sweepea Excel Discussion (Misc queries) 1 March 13th 07 11:05 PM
Excel 2003 -Rows hidden. Scrolling unhides rows ! How do I stop th Excellent1975 Excel Discussion (Misc queries) 0 June 21st 06 08:01 PM


All times are GMT +1. The time now is 07:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"