Now, here is the output of a little jobbie that I been messing with for a couple hours this morning...
Sandy Creek Road
Driver | Car | Time |
| Cheeze | 71 Javelin-AMX | 113.871 |
| Cheeze | 70 Cougar | 114.279 |
| Cheeze | 65 GTO | 115.761 |
| xx | xx | xx |
Or how it looks under the editor's hood...
[b][u]Sandy Creek Road[/u][/b]
[table]
[tr]
[td][center][b][u] Driver [/u][/b][/center][/td]
[td][center][b][u] Car [/u][/b][/center][/td]
[td][center][b][u] Time [/u][/b][/center][/td]
[/tr]
[tr][td]Cheeze[/td][td]71 Javelin-AMX[/td][td][center]113.871[/center][/td][/tr]
[tr][td]Cheeze[/td][td]70 Cougar[/td][td][center]114.279[/center][/td][/tr]
[tr][td]Cheeze[/td][td]65 GTO[/td][td][center]115.761[/center][/td][/tr]
[tr][td]xx[/td][td]xx[/td][td][center]xx[/center][/td][/tr]
[/table]
The important part for this discussion is the three rows that contain the lap information. The rest of it is just boiler plate. Well, the three rows are too, but they are created with live data from a spreadsheet. I wanted to share the functions that I use with you. I would give you the sheet, but the functions are all connected to other spreadsheets, in other workbooks even, and those types of functions don't travel well.
First, here is what the function for the Javelin looks like in the spread sheet when not calculated. I call this function my
Boiler Plate Function and will refer to it as BPF from now on...
="
| "&IF(D5="",$D$1,D5)&" | "&IF(E5="",$E$1,E5)&" | "&TEXT(F5,"0.000")&" |
"
="[tr][td]"&IF(D5="",$D$1,D5)&"[/td][td]"&IF(E5="",$E$1,E5)&"[/td][td][center]"&TEXT(F5,"0.000")&"[/center][/td][/tr]"Cell $D$1 contains "Cheeze". If D5 is empty, you see that, otherwise you see whatever is typed in.
Cell E5 contains this function;
=VLOOKUP($B5,'4G_StStock.xls'!Stable,20,0)In this function, $B5 contains the Car's name.
NOTE: The Car's Name, Cell A1 in the tuning sheet is used as a primary key though out all my spread sheets. That is why I always use a reference to that cell when I want to display the name. That way the name only exists in one place, if I edit the name, all references are immediately updated, and that way I can count on using the name as a key - they are always the same. But what I am looking for here is the car's nick name, and this is stored in the #20 column of the Stable worksheet.
Cell $E$1 contains the words "A Car". That is used in the BPF if E5 is empty.
Cell F5 contains this function;
=VLOOKUP($B5,NoAm!Hotlap,$F$1,0) This is the same deal, only this time I am looking up the car name in the leaderboard sheet named "NoAm", and in the range named "Hotlap". The data I am after is in the column whose number is contained in cell $F$1, or in this case, the column number 8 (the column that contains Infineon Long times.) The reason I do it this way is that I can change all of the report targets by just entering the column number in one place... $F$1.
What I end up with is a 3 column table, with the Driver Name, the Car Nickname, and the Time. It can be sorted on any field and it will hold its data as long as the Car Name is (Column B) is included in the sort. (I guess I have a 4 column table then...

) The boiler plate function could be sorted as well, but it doesn't have to be. It just pumps out what ever info is in cells D, E, and F 5.
This looks like a bunch of jibberish, no doubt. But if you think about it, and where you have your information stored in you spread sheets, it will start to make a little sense.
And, it makes maintaining a leaderboard for one of these challenges a hell of a lot easier than entering all that BBCode by hand...

$