Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-13-2014, 06:42 AM
zulugandalf zulugandalf is offline Return Sum value of one column from cells not blank in another column Windows 8 Return Sum value of one column from cells not blank in another column Office 2013
Novice
Return Sum value of one column from cells not blank in another column
 
Join Date: Aug 2014
Posts: 4
zulugandalf is on a distinguished road
Default Return Sum value of one column from cells not blank in another column


I have a table with Net and Gross data in 2 columns. In the rest of the columns there are years (2010,2011,2012,2013). For the years that have a 1 (and is not blank) is it possible to sum the corresponding values from Net or gross on the same row. Without using a pivot table.

Please look at the attached example.


Probably easy to do, but I am rubbish on excel!
Attached Files
File Type: xlsx Example.xlsx (10.6 KB, 20 views)
Reply With Quote
  #2  
Old 08-13-2014, 08:52 AM
bobsone1 bobsone1 is offline Return Sum value of one column from cells not blank in another column Windows Vista Return Sum value of one column from cells not blank in another column Office 2007
Novice
 
Join Date: Jul 2014
Posts: 23
bobsone1 is on a distinguished road
Default

I am also a bit rubbish with Excel :-)

But, perhaps something like this would work:-

=IF(D2=1;A2+A5;0) returns -6
=IF(D5=1;B2+B5;0) returns 4
And
IF(D6=1;B3+B6;0) leaves the cell blank

So when they are strung together, the Gross Data B2:B8 column would look like this:-
=IF(D2=1;B2;0)+IF(D3=1;B3;0)+IF(D4=1;B4;0)+IF(D5=1 ;B5;0)+IF(D6=1;B6;0)+IF(D7=1;B7;0)+IF(D8=1;B8)

Perhaps someone with some skills can suggest a more "elegant" solution :-)

Last edited by bobsone1; 08-13-2014 at 09:36 AM. Reason: add more
Reply With Quote
  #3  
Old 08-14-2014, 12:17 AM
RAJUSINGH.1111 RAJUSINGH.1111 is offline Return Sum value of one column from cells not blank in another column Windows 7 64bit Return Sum value of one column from cells not blank in another column Office 2007
Novice
 
Join Date: Aug 2014
Location: New Delhi
Posts: 3
RAJUSINGH.1111 is on a distinguished road
Thumbs up Use SUMIF

Hi zulugandalf,


You need to use SUMIF function to sum the corresponding values.

Please look at attached sheet.

Good Luck


----------
Raju Singh
New Delhi, India
Attached Files
File Type: xlsx sumif.xlsx (11.4 KB, 23 views)
Reply With Quote
  #4  
Old 08-14-2014, 03:37 AM
zulugandalf zulugandalf is offline Return Sum value of one column from cells not blank in another column Windows 8 Return Sum value of one column from cells not blank in another column Office 2013
Novice
Return Sum value of one column from cells not blank in another column
 
Join Date: Aug 2014
Posts: 4
zulugandalf is on a distinguished road
Default

Thanks works great!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Return Sum value of one column from cells not blank in another column Macro to remove blank column netchie Word VBA 4 03-14-2013 02:22 PM
Summing Non Contiguous Cells in a Row or Column Joe Ottenhof Excel 4 12-19-2012 04:13 AM
as the return value of another column, using Listbox? marreco Excel Programming 1 03-27-2012 12:48 PM
Can I change the horizontal scrollbar to scroll smoothly rather than column by column carpat Excel 0 01-10-2012 09:34 AM
Return Sum value of one column from cells not blank in another column Need to search a column for a macth and return a result from a third column pdfaust Excel 2 02-03-2011 03:02 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:34 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft