View Single Post
  #10   Report Post  
Posted to microsoft.public.excel.worksheet.functions
UKMAN UKMAN is offline
external usenet poster
 
Posts: 70
Default sum a value depending on the value of a cell??

RagDyeR,

It worked brilliantly my utmost grats...

Cheers

"RagDyeR" wrote:

The formula I suggested will do that *exactly*, however, in a vertical
configuration.

It can very easily be revised to a row (horizontal), but the point now comes
up ... do you have a pre-existing list of your variables to use as a
criteria for the Countif() formula?
OR
Do you also want (need) a formula to determine a list of your unique
variables?
--

Regards,

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



"UKMAN" wrote in message
...
RagDyer, I think I understand your brilliance... but I think I may need to
give another example to clarify. sorry.

Imagine a calendar with its 31 days (a3-ae3) horizontal showing 1 of 10
variables i.e B, B.5, T
In row a4-ae4 with be a changing cost i.e £2.50 for the above cell.

1
2 a b c d e f g
3 B T B B B.5 B.5 B
4 2.5 2.0 1.8 2.0 1.25 1 3.0

What I am trying to do is calculate in cells ah4, ai4 etc is total sum of
the costs for each the variables i.e. in the above exampl B=9.3, T=2,
B.5=2.25

I hope this example shows it more clearly and many thanks.


"RagDyeR" wrote:

Say your data is in A1 to AE2.

List your variables in say A5 to A14.

In B5, enter this formula:

=SUMIF(A$1:AE$1,A5,A$2:AE$2)

And copy down to B14.
--

HTH,

RD
================================================== ===
Please keep all correspondence within the Group, so all may benefit!
================================================== ===


"UKMAN" wrote in message
...
Hi
I have 2 rows of data (31 columns wide), in each cell of the the top row
is
a variable i.e. B, B.5, P,; (upto 10 differant variables).
In each cell of the 2nd row under each variable will be an associated cost
i.e. £2.00, £1.50 or whatever.

What I need to do is calculate the total sum of the individual variables,
i.e. sum of the B variable = 10 occurances x £2.00 = £20.00 etc and this
is
shown in a seperate area of the spreadsheet.

gratefull for all and any help.
Cheers