Field searching?

W

wufishmonger

I am working on some financial calculations for a start up business.
need some help getting exactly what I need from excel. So here is th
situation:

I have a table set up on the first sheet. The first column is calle
"Sale Amount". In the business there can be sales from 1 cent up to 10
dollars and anywhere in between. So this column begins with $0.01 an
goes all the way to $100.00. The Revenue generated by the sale is the
divided into three different accounts according to a formula. So I hav
three more colums labled "account 1", "account 2", and "account 3"
There are formulas in each cell in these colums to calculate th
appropriate money put into each account from each sale.

Now here is where I run into a problem. I want to have anothe
worksheet with a table that gives me information derived from a give
range of rows from the first worksheet. It will have 2 colums where
type in a range of cells. Then it will have more columns with formula
to calculate different values based on the numbers in the accoun
columns for this range. For instance if I type in "From $.01 To $5.00
in the first two columns I want formulas in the other rows of thi
table to calculate things like the average of all the cells in th
account 1 column in that range. So in this case there would be 500 row
in this range. Excel would have to search the "Sale amount" row in th
first table to find these rows. Then it would have to add up ever
value in the "account 1" column and divide that number by 500. Th
number from this calculation would then be posted in the next column i
the second worksheets table right after the "from" and "to" columns
Excel would have to recognize how many rows total are in the range s
it could divide by that number. It would also have to add only value
in the account 1 column that fell into that range.

I dont know what I would have to do to make this work. Thanks for an
help in advance
 
M

mrice

I would be tempted to go for a user defined function in this case which
scans the first sheet for values in your range and keeps a running
total so that averages etc can be worked out.
 
W

wufishmonger

would you be willing to explain how I could use data in cells adjacen
to the values that are within the correct range? Or point me to
tutorial
 
B

Biff

Hi!

Sheet1 column A A2:An contain the values 0.01 to n.

Column B = Acct1

Sheet2

A1 = header = From
B1 = header = To

A2 = 0.01
B2 = 0.10

=AVERAGE(INDEX(Sheet1!B2:B21,MATCH(A2,Sheet1!A2:A21,0)):INDEX(Sheet1!B2:B21,MATCH(B2,Sheet1!A2:A21,0)))

Adjust references to suit.

Biff

"wufishmonger" <[email protected]>
wrote in message
news:[email protected]...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top