Excel

Please register or login

Welcome to ScubaBoard, the world's largest scuba diving community. Registration is not required to read the forums, but we encourage you to join. Joining has its benefits and enables you to participate in the discussions.

Benefits of registering include

  • Ability to post and comment on topics and discussions.
  • A Free photo gallery to share your dive photos with the world.
  • You can make this box go away

Joining is quick and easy. Log in or Register now!

horsemen

Contributor
Messages
107
Reaction score
0
Location
Edwards af base Ca
i would like to use excel to make my own diver log
but i would like to set it up like this

column A date
column B place of dive
column C Depth
column D time
column E pg but i would like it to fig my pressure group.
column F temp
column G Visibility

ok back to column E any ideas on what the formula would be?

i know i would need to input the whole dive table on another page and then have get the data from that page just not sure how to make it work. i only know very basic excel
 
There's no way to have excel calculate the pressure group, so you'll have to enter it yourself from the tables. If doing a multilevel dives, you'll need the wheel, and the split times at benchmark depths. Alternatively, if using a computer, at the end of the dive note the planned NDL time at say 40 feet & a table and work backwards to calculate the pressure group.
 
you can use a lookup function; but you'll have to have all the table entered in e-format
 
There's no way to have excel calculate the pressure group.

Pretty sure there is a way but not with basic excel skills. If I wasn't at work right now I'd have a crack at it, if I have any luck I will let you know horseman. Doubt it would work with multilevel dives though, you're right don Francisco, then the tables I use don't help much there anyway.

Horseman, this might help you PJF's Pages - No-decompression dive calculator. You could just enter the results manually using that website.
 
OK, I'm not sure what people mean with "basic" Excel skills but there is a reasonably simple way of doing this. Of course it becomes much more complicated if you're doing repetitive dives but here is a simple example of how to do a simple lookup.

Of course you will have to enter the table into a seperate sheet (as you said) because Excel can't calculate the group but it can look the group up from a table which you provide. You'll then have to understand the MATCH and OFFSET worksheet functions, they're fairly straight forward.

One important thing that will be neccessary is to have the table sorted properly so that Excel can do the lookup. Unfortunately, because we want Excel to find the smallest depth equal or bigger than the maximum dive depth and because we want Excel to find the smallest time equal or greater than the dive time, the table will have to be upside down and inverted left to right from what we are used to with most published dive tables. This is just how the MATCH worksheet function works (third parameter = -1).

Here is a screen grab of a simple table that I quickly entered:
GroupCalc.png

Notice how the table is upside down and left to right.

Now, below the table you will notice three values, one for the dive depth (sorry I used meters;)), another for the dive time and a third which is a calculated value for the Pressure Group.

The formula that goes into cell B16 is as follows:
=OFFSET(A1,0,MATCH(B15,OFFSET(B1:L1,MATCH(B14,A2:A11,-1),0),-1))

This might look very daunting but it's actually straight forward if you understand the MATCH and OFFSET worksheet functions. I'll give you a quick rundown of the function above.

Basically, what OFFSET does is to return a cell (or range) which is a specified number of rows and columns removed from a specified cell (or range). What MATCH does is to find a specified value in a range of values and return the position of that value in the range.

So, first of all we want to find the position in the table (top to bottom) that holds the row of time values corresponding to the depth at which the dive was. The function MATCH(B14,A2:A11,-1) will do that. Basically what we're doing here is to tell Excel to find the position in A2:A11 where the value is equal or greater than B14 (the dive depth).

Now that we know at which position that row is, we need to reference that row. The function OFFSET(B1:L1,MATCH(B14,A2:A11,-1),0) will do that. Notice how the above MATCH function forms part of this function. What we're doing here is to tell Excel to return the range which is y number of rows down from B1:L1 and 0 number of columns to the right. Of course the value y is the result of the first function.

Now that we have the applicable row, we want to find the position of the dive time in it. Again, we can use the MATCH function, as follows:
MATCH(B15,OFFSET(B1:L1,MATCH(B14,A2:A11,-1),0),-1)
This is telling Excel to find the position in range n where the value is equal or greater than B15 (the dive time).

Finally, now that we have the horizontal position in the row, it's a simple matter of returning the Pressure Group value from the top row, again using the OFFSET function:
=OFFSET(A1,0,MATCH(B15,OFFSET(B1:L1,MATCH(B14,A2:A11,-1),0),-1))
telling Excel to return the cell which is 0 number of rows down from A1 and x number of columns to the right.

Hope this makes sense. Let me know if you have questions. If you PM me your e-mail address I can send you this Excel file if that would make it easier for you to understand. As a final note, you could also look into using VLOOKUP and HLOOKUP, those are two functions that I use often but for this particular problem I thought the combination of MATCH and OFFSET was easier.

Cheers,
D
 
As a final note, you could also look into using VLOOKUP and HLOOKUP, those are two functions that I use often but for this particular problem I thought the combination of MATCH and OFFSET was easier.

That was what I was going to try :P But what you've done works out better, good stuff Deefstes!
 

Back
Top Bottom