Discussion Locked

Excel formula troubles macro? VB?

0 helpful
4 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

I have a problem with an Excel spreadsheet.
What i am trying to do is this:
I have a set of Columns with the names PAPER, VALUE,PRICE,DAYS,SOLD.
Under the PAPER column i have inserted names-Sun,Record,Herald,Post,etc.
I have another column NamedVALUE
Each PAPER has a VALUE assigned to it say Sun=1,Record=2 etc.
There is a third column COST. This has a paper value in ?
The fourth column i have is DAYS for the day of the week.
The fifth column i have is the SOLD column.
I have applied afilter to my data in order that i can have only the Heralds fields showing for example.
This shows me how many heralds i sold on a certain day and at what price etc. (as the price of newspapers may sometimes not always be constant).
What i want toknow is this:
When i filter data is there anyway to have the results of the filtered data sorted in order that it can work the cost out for me?
How would i achieve this? Could i do something similar to. Sum=all row A*all row B ---And would this work on filtered colums?

Any suggestions at all much appreciated. Thanks in advance!

4 replies

by dklippert

You don't have to filter to do this.
Take a look at the SUMIF function:

=SUMIF(range,criteria,sum_range)

You could set it up so that the formula will look at the VALUE column (or the PAPER colum, for that matter). When ever an entry equals the criteria (1 or Sun) the coreponding value in the COST column will be added.

This discussion is closed to new replies.