Welcome to the Excel Forum

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed.

Please Register to Remove these Ads

Please Register to Remove these Ads



Reply
  #1  
Old 06-25-2009, 09:31 AM
shine shine is offline
Registered User
 
Join Date: 25 Jun 2009
Location: Amstelveen, Netherlands
MS Office Version:Excel 2003
Posts: 1
shine is becoming part of the community
Using values to create "from:to" formula's

Please Register to Remove these Ads

Okay, the topic title is a bit difficult to understand, but I my english lacks a bit I suppose. I'll make the intro and essence of the question. I think the essence whould be enough, but I want to make the question as clear as possible.

[b]Intro:[b]
The problem is the following:

We have gathered a lot of data which for a geological research. We used a lot of hightech gear to gather this data in high resolution and we found a problem in a specific branch of the subject, something that hasn't been seen in the last 20 years or so. Basically a specific type of strength profile was always though to be strictly within a layer and with hard borders to the next layer. We found that this is usually not true and the borders are more large transitionzones. We now want to describe these zones as individual layers.

Because of our used technique, we want to show this problem by displaying the standard deviation. A type of rock that has a constant strength shows a low value, a transitionzone a high value. However, to do all this a lot of manual labor has to be done, since defining a the strength layers/zones are done manually. These numbers are written down in an Excel sheet:

Problem
The Excel sheet has a few collums:
A: Height
B: Strenght at that height

Then we have a summary block
H: From (which is a number that indicates the first line that we want to use)
I: To (which is the last number we want to use.)

We want to create collum C: The average strength for a selection of collum B displayed in every row of that section in collum C.
For example:
Collum B has 236 values and we want to create averages of the rows 2-30, 31-50, 51-236. In H we have below eachother 2, 31, 51 and in I we have 30, 50, 236. (in reality we have much more " bins").

Now I want excell to use those values to run a macro. The effective formula in C should be something like: AVERAGE (B"value in box H1" :B"Value in box I1"). With a lot of pondering this is essentially my only problem: to create a formula where excel reads the number in the box and uses that to complete the "from:to" limits.
Reply With Quote
  #2  
Old 07-04-2009, 07:47 AM
19fortysix 19fortysix is offline
Registered User
 
Join Date: 01 Sep 2008
Location: Houston, TX
Posts: 46
19fortysix is becoming part of the community
Re: Using values to create "from:to" formula's

=average(indirect("b"&h1&":b"&i1))
Reply With Quote
  #3  
Old 07-04-2009, 12:55 PM
shg's Avatar
shg shg is offline
Forum Guru
 
Join Date: 20 Jun 2007
Location: The Great State of Texas
MS Office Version:2003, 2007
Posts: 18,491
shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay shg makes giving solutions look like childsplay
Re: Using values to create "from:to" formula's

If 19fortysix's suggestion does what you want, great. If not, please post a workbook and sample data that shows an example of what you want.
__________________
Entia non sunt multiplicanda sine necessitate.
Reply With Quote


Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Forum Jump