wilebill
12-16-2006, 12:39 AM
Hopefully there's an Excel guru or 2 around here. I'm not bad at it, but I've hit a brick wall on a function that I need but can't find. Here's what I need help with.
I've got 2 rows and 11 columns of data that I need to do a lookup on the first row and extract the data from the cell below that matches the lookup. Problem is, the data in the first row is not ordered and "hlookup" or just plain "lookup" won't seem to work unless the data in the rows are ordered.
Here's what the 2 rows look like:
<table x:str="" style="border-collapse: collapse; width: 528pt;" border="0" cellpadding="0" cellspacing="0" width="704"><col style="width: 48pt;" span="11" width="64"> <tbody><tr style="height: 15pt;" height="20"> <td style="height: 15pt; width: 48pt;" x:bool="FALSE" align="center" height="20" width="64">FALSE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> <td style="width: 48pt;" x:bool="TRUE" align="center" width="64">TRUE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl22" style="height: 15pt;" height="20"> 1</td> <td class="xl22" style="border-left: medium none;"> 2
</td> <td class="xl22" style="border-left: medium none;"> 3</td> <td class="xl23" style="border-left: medium none;"> 4</td> <td class="xl22" style="border-left: medium none;"> 5</td> <td class="xl22" style="border-left: medium none;"> 6</td> <td class="xl22" style="border-left: medium none;"> 7</td> <td class="xl22" style="border-left: medium none;"> 8
</td> <td class="xl22" style="border-left: medium none;"> 9
</td> <td class="xl22" style="border-left: medium none;"> 10
</td> <td class="xl22" style="border-left: medium none;"> 11
</td> </tr> </tbody></table>
What I want to do is to look on the first row until it finds "true" and then extract the data in the cell beneath that (in this case "4") and insert it into the cell that holds the formula. Different scenarios will have "true" in different cells because that is calculated on several other conditions, but only one of the cells on the first row will ever have "true" in it at any given time.
Seems like it ought to be easy to do: look on this row till you find true, then give me the data in the cell under that. But I can't find a function that does anything simple like that.
Any help? Oh, and as an aside I'm using Office 2003, which sometimes acts wonky so maybe it's just in a wonky mood and hlookup should actually work with this.
I've got 2 rows and 11 columns of data that I need to do a lookup on the first row and extract the data from the cell below that matches the lookup. Problem is, the data in the first row is not ordered and "hlookup" or just plain "lookup" won't seem to work unless the data in the rows are ordered.
Here's what the 2 rows look like:
<table x:str="" style="border-collapse: collapse; width: 528pt;" border="0" cellpadding="0" cellspacing="0" width="704"><col style="width: 48pt;" span="11" width="64"> <tbody><tr style="height: 15pt;" height="20"> <td style="height: 15pt; width: 48pt;" x:bool="FALSE" align="center" height="20" width="64">FALSE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> <td style="width: 48pt;" x:bool="TRUE" align="center" width="64">TRUE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> <td style="width: 48pt;" x:bool="FALSE" align="center" width="64">FALSE</td> </tr> <tr style="height: 15pt;" height="20"> <td class="xl22" style="height: 15pt;" height="20"> 1</td> <td class="xl22" style="border-left: medium none;"> 2
</td> <td class="xl22" style="border-left: medium none;"> 3</td> <td class="xl23" style="border-left: medium none;"> 4</td> <td class="xl22" style="border-left: medium none;"> 5</td> <td class="xl22" style="border-left: medium none;"> 6</td> <td class="xl22" style="border-left: medium none;"> 7</td> <td class="xl22" style="border-left: medium none;"> 8
</td> <td class="xl22" style="border-left: medium none;"> 9
</td> <td class="xl22" style="border-left: medium none;"> 10
</td> <td class="xl22" style="border-left: medium none;"> 11
</td> </tr> </tbody></table>
What I want to do is to look on the first row until it finds "true" and then extract the data in the cell beneath that (in this case "4") and insert it into the cell that holds the formula. Different scenarios will have "true" in different cells because that is calculated on several other conditions, but only one of the cells on the first row will ever have "true" in it at any given time.
Seems like it ought to be easy to do: look on this row till you find true, then give me the data in the cell under that. But I can't find a function that does anything simple like that.
Any help? Oh, and as an aside I'm using Office 2003, which sometimes acts wonky so maybe it's just in a wonky mood and hlookup should actually work with this.