Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding and grouping values within a range

Status
Not open for further replies.

AggiePETE

Petroleum
Joined
May 20, 2011
Messages
4
Location
US
I am having some trouble identifying the function or the method that I need to use to go about my issue.

I have exported a bunch of data into excel showing the data & time, pressure and flowrate. What I want to do is be able to identify atleast one hour periods of time that have a relatively constant pressure (i.e. a range withing -/+ 5 psi) and see what the flowrate during that period is. I have tried several excel functions such as Vlookup and match/indes, however, these are not powerful enough to do what I would like. I am having a hard time finding a function that can identify up to one hour blocks of time which also have a relatively constant pressure. I have a feeling this might require some VBA coding, however, I do not have any experience in VBA.

I have attached the spreadsheet containing the data I am working with to give you an idea of what I am talking about.

Your help is much appreciated.
 
Thank you for the reply. I have graphed already graphed it and even though it does help identify regions of constant pressure, however, I don't want to go through the spreadsheet manually to find this as it is very time consuming but just have a function that can do it for me.
 
You didn't attach the file, but look at this. It uses MAX and MIN to identify if the pressure in the half hour before and after each time period falls inside a range, then calculates the average flow for the hour.
 
 http://files.engineering.com/getfile.aspx?folder=d3fac322-b0ca-4933-80bd-1667ef5fb8d1&file=Constant.xls
the simplest method would be to have a column with an IF statement
Code:
=IF(AND(b2>=35,cell<=45),c2,"")
where column B is the data containing pressure, Col C contains flowrate, and the ideal pressure is 40 +/- 5 psi (35 & 45)
 
seems like jghrist's solution has met all the requirements of the original poster.

=====================================
(2B)+(2B)' ?
 
sorry about that, I thought I attached it.

jghirst your example helped me out a lot though, gives me a better idea of what to do. What do you think I could do in the case that the time intervals are not constant between subsequent pressure and flow measurements?

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top