View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Cat Cat is offline
external usenet poster
 
Posts: 63
Default function returning SUM of 2 adjacent cols in 2 separate cells

Hi everyone, I need some help with this please; I am using Excell 2007

Worksheet contains 6 cols, T,U,V,W,X and Y and another col AG in a small
recap table a few columns outside the main worksheet.
Col W contains a formula (copied and pasted right down the col):
=IF(T2="YES",(U2)*V2," ") returning a + figure.
Col X contains a formula (again copied and pasted right down the col):
=IF(T2="NO",-V2," ") returning a - figure.
Col Y contains a formula (in one cell only at the end of a variable series
of row (ranging from 4 to 25+) =SUM(W2:W12)+(SUM(X2:X12) returning the total
of cols W and X for that particular block of rows (in this instance,
positioned in row Y12).
Cols T, U and V are blanks and data is entered as needed which prompts cols
W, X and Y to return a value.
Example:
Col T Col U Col V Col W Col X Col Y
Col AG
Row 2 blank blank blank blank blank blank
2600
Row 3 Yes 30 100 3000 blank blank
2000
Row 4 No blank 450 blank -450 blank
Row 5 blank blank blank blank blank blank
Row 6 Yes 50 20 100 blank blank
Row 7 No blank 50 blank -50 2600
Row 8 blank blank blank blank blank blank
etc
etc
Row 18 yes 100 20 2000 blank 2000
etc
etc
And so on, with a total in col Y for each "block" of data.

What I am doing:
Copy and paste my formulae in cols W and X; then, manually counting the
total of rows in each block, enter the SUM formula in the "framed" cell in
col Y, at the end of each sequence (which can vary from 4 rows to 25 or more);
I then make a note of the cell row number and enter an =Y... in column AG of
the recap table (for instance in the example above, in AG2, I will enter:
=Y7; in AG3, I will enter =Y18, and so on for each block, in AG4, AG5, etc.).
I hope this is clear !

What I would like:
Is to automate the process so that the SUM total of cols W and X will be
calculated in the appropriate cell in col Y and be replicated in col AG -
without having to resort to the manual process. Is this possible?
The amount or rows in each block is randomly different - Data is imported
and sorted chronologically before copying into worksheet.

Thank you very much for any help