×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Are you an
Engineering professional?
Join Eng-Tips Forums!
• Talk With Other Members
• Be Notified Of Responses
• Keyword Search
Favorite Forums
• Automated Signatures
• Best Of All, It's Free!

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

#### Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

# Sizing Gas Lines In Excel

## Sizing Gas Lines In Excel

(OP)
I am trying to make a spreadsheet to when I put in the CFH of a piece of equipment in one cell, it totals up all the CFH and spits out a pipe size in another cell. I set up the gas table just as it appears in the 94' Plumbing Code in the spreadsheet. I used hlookup at first and it doesn't work, for me anyway. The way I did it, it will scan across for the distance and then scan down for the CFH. The only way it find that CFH is to put in a row number. I have been trying to work on this for months now, so I'm finally breaking down and asking, Can anybody help me?

### RE: Sizing Gas Lines In Excel

playing around with it, and not knowing how many different cfc there are, i set up a range of formulae to cover each size, but i have a feeling there is a lot?

use the countif function. this will count up ho wmany part there are with a given criteria, once you have a number cnverting to a pipe size is easy.

### RE: Sizing Gas Lines In Excel

Im not sure that i toally get you question but assuming that what you have is a table with some "x" values across and some "y" values down. You then need to match a x and a y value and find the result in the table. The x values a located in the top row and the y values are located in the left most collum of an array (im assuming this)

You need to make a "nested" hlookup and vlookup.

Make the "inner lookup" the vlookup that scans the left (y) collumn and returns the row number that fits in the outer hlookup (a bit tricky). You may need to add an extra "index collum) right of your data that help the vlookup to identify the row. heres an example:

x val=2
y=c

formula:
=hlookup(2,a1:f6,vlookup("c",a1:g6,7))
The inner lookup wil respond "4" (not displayed anywhere)

the outer lookup will respond 32 (the result of the formula)

1   2   3   4   5   (comment: right most collumn is index collumn)
a 11 12 13 14 15 2
b 21 22 23 24 25 3
c 31 32 33 34 35 4
d 41 42 43 44 45 5
e 51 52 53 54 55 6

### RE: Sizing Gas Lines In Excel

(OP)
Thank you for your help. We are almost there. The table MortenA has set up is correct. What I am trying to accomplish is to read across as you did to "2", then read down to a specific number (the number might not be an exact number and will have to read the next higher number), then go to the first column and read that number or letter. For instance, "c".

### RE: Sizing Gas Lines In Excel

Hi Cujonles:

I had made a litle macro to do the same you want to

I made it in metrics units relating
pipe diameter in asa schedules
pipe distance in meters
and flow as calories to handle .
you can replace such values with yours.
k281969@hotmail.com

Pardal

#### Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

#### Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Close Box

# Join Eng-Tips® Today!

Join your peers on the Internet's largest technical engineering professional community.
It's easy to join and it's free.

Here's Why Members Love Eng-Tips Forums:

• Talk To Other Members
• Notification Of Responses To Questions
• Favorite Forums One Click Access
• Keyword Search Of All Posts, And More...

Register now while it's still free!