Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / July 2006

Tip: Looking for answers? Try searching our database.

How do I add all values in a given row (not colum)?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
xenxander - 16 Jul 2006 17:03 GMT
i am trying to search colum "A" for all values equal to something, say all
the cells that have '1000' as their data, and then add up all the cells in
the corresponding row, so if A34, A50, and A56 all have 1000 in them, then I
want to return the value of all the cells added up in the rows, say B34,50,56
: K34,50,56
Toppers - 16 Jul 2006 17:16 GMT
Enter with Ctrl-Shift-Enter (an array formula)

=SUM(IF(A1:A100=1000,B1:K100))

Change range to suit

> i am trying to search colum "A" for all values equal to something, say all
> the cells that have '1000' as their data, and then add up all the cells in
> the corresponding row, so if A34, A50, and A56 all have 1000 in them, then I
> want to return the value of all the cells added up in the rows, say B34,50,56
> : K34,50,56
VBA Noob - 16 Jul 2006 17:34 GMT
Or how about

=SUMPRODUCT(--($A$1:$A$56=1000)*($A$1:$A$56)+(--($A$1:$A$56=1000)*($B$1:$B$56)+(--($A$1:$A$56=1000)*($K$1:$K$56)))
Ragdyer - 16 Jul 2006 17:45 GMT
What's wrong with simply using:

=SUMPRODUCT((A1:A100=1000)*B1:K100)

Signature

Regards,

RD

---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------

>
> Or how about

=SUMPRODUCT(--($A$1:$A$56=1000)*($A$1:$A$56)+(--($A$1:$A$56=1000)*($B$1:$B$5
6)+(--($A$1:$A$56=1000)*($K$1:$K$56))))
VBA Noob - 16 Jul 2006 17:59 GMT
Sorry I read it wrong

I thought he just wanted Col B and K not all of them

VBA Noo
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.