Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4
Default Adding and subtracting many columns numbers

My column B is entitled "No. in Stock". These boxes contain the quantity of a
certain product that we have in stock.

My columns E and G are entitled "Used" and "Delivered" respectively. These
column are repeated in H and J, K and M etc etc

What I want to happen is that when a number is put in E it is subtracted
from B and then G is added to B.

Is there a shorter way of doing this rather than typing in
=(-E5+G5)+(-H5+J5)+(-K5+M5) etc etc because in the row 5 there could be up to
50 different sections

Thanks
WoodyAccess
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,886
Default Adding and subtracting many columns numbers

Hi

Assuming your headings are in row 4, enter in B5

=SUMPRODUCT((E$4:Z$4="Delivered")*E5:Z5)-SUMPRODUCT((E$4:Z$4="Used")*E5:Z5)

Change the ending column from Z in each case to whatever you want.
Change the row identifier from 4 to whatever row you use for the
"Delivered" and "Used".



--
Regards

Roger Govier


"WoodyAccess" wrote in message
...
My column B is entitled "No. in Stock". These boxes contain the
quantity of a
certain product that we have in stock.

My columns E and G are entitled "Used" and "Delivered" respectively.
These
column are repeated in H and J, K and M etc etc

What I want to happen is that when a number is put in E it is
subtracted
from B and then G is added to B.

Is there a shorter way of doing this rather than typing in
=(-E5+G5)+(-H5+J5)+(-K5+M5) etc etc because in the row 5 there could
be up to
50 different sections

Thanks
WoodyAccess



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
adding and subtracting using vb code ASU Excel Discussion (Misc queries) 2 October 7th 06 09:48 AM
adding and subtracting columns sierra_louise Excel Worksheet Functions 3 August 24th 06 11:45 AM
formula for adding / subtracting two columns . jm New Users to Excel 2 May 24th 06 10:50 AM
Rounding Error when adding or subtracting two cells mtheo Excel Worksheet Functions 2 February 28th 06 06:51 PM
How to display 5.5 hours instead of 5.30 when adding \ subtracting excel novice Excel Discussion (Misc queries) 4 November 26th 05 04:22 AM


All times are GMT +1. The time now is 12:04 AM.

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"