I'm not sure I see how making it a UDF will improve the situation, as you will still have to manually edit something to tell it which column to return from.
Writing UDF's is not difficult, but it sounds like there is going to be a learning curve since, by your own admission, you don't know any VBA. I find that there are two basic skills to programming - decomposing a problem down into individual steps (this is not necessarily language specific), then language specific syntax to describe how to execute the algorithm in a specific language.
This might be a good place to start for learning how to write UDF's http://office.microsoft.com/en-us/ex...001111701.aspx It says it was written for 2003, but, as far as I know, the basic ideas are still the same.
I would also suggest that, as you build the UDF, that you start simple, and work your way up to more complex. So, since cross-sectional area is a part of the calculation, I might start with a UDF that calculates cross sectional area. This will demonstrate the very basic ideas in writing UDF's like - passing arguments to the function and getting a value returned from the function without the complexities of lookups and so on. This might look like
Called as =flowspeed(F20) from your sample spreadsheet. From there, you can expand the calculation to do what you need. When you are ready, you can then add a lookup section (I like to use the Excel's MATCH() function, you could also use VLOOKUP()) to get the diameter from the table. See http://msdn.microsoft.com/en-us/libr...ice.11%29.aspx
Bookmarks