Hey! Just registered to the site, but have been a long time lurker.
I was wondering if it is possible to use a lookup function (vlookup for instance) and force it to calculate the last populated cell in a row as the column index.
For instance:
[TABLE="width: 384"]
<tbody>[TR]
[TD="colspan: 2"]Unique Id[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1032[/TD]
[TD]Text[/TD]
[TD]Text[/TD]
[TD]Text[/TD]
[TD="align: right"]2695[/TD]
[TD="align: right"]0.0425[/TD]
[/TR]
[TR]
[TD]1150[/TD]
[TD]Text[/TD]
[TD="align: right"]4575[/TD]
[TD="align: right"]0.0722[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1151[/TD]
[TD]Text[/TD]
[TD]Text[/TD]
[TD="align: right"]266[/TD]
[TD="align: right"]0.0042[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1170[/TD]
[TD]Text[/TD]
[TD]Text[/TD]
[TD]Text[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]0.0002[/TD]
[/TR]
[TR]
[TD]1174[/TD]
[TD]Text[/TD]
[TD]Text[/TD]
[TD]Text[/TD]
[TD="align: right"]0.0089[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Say I have this data set, is it possible create a formula that allows the lookup to find the last populated cell in the row and use that as the col_index_num?
I have been playing around max and column and managed to reference the column number of the last cell but cant seem to figure out how to use this in a lookup function.
Here is what I have so far:
=MAX(([the row selection]<>"")*(COLUMN([the row selection])))
It seems to work, but it relies on me manually selecting the row I want so wont work for a lookup function.
Thanks in advance!
I was wondering if it is possible to use a lookup function (vlookup for instance) and force it to calculate the last populated cell in a row as the column index.
For instance:
[TABLE="width: 384"]
<tbody>[TR]
[TD="colspan: 2"]Unique Id[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1032[/TD]
[TD]Text[/TD]
[TD]Text[/TD]
[TD]Text[/TD]
[TD="align: right"]2695[/TD]
[TD="align: right"]0.0425[/TD]
[/TR]
[TR]
[TD]1150[/TD]
[TD]Text[/TD]
[TD="align: right"]4575[/TD]
[TD="align: right"]0.0722[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1151[/TD]
[TD]Text[/TD]
[TD]Text[/TD]
[TD="align: right"]266[/TD]
[TD="align: right"]0.0042[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]1170[/TD]
[TD]Text[/TD]
[TD]Text[/TD]
[TD]Text[/TD]
[TD="align: right"]14[/TD]
[TD="align: right"]0.0002[/TD]
[/TR]
[TR]
[TD]1174[/TD]
[TD]Text[/TD]
[TD]Text[/TD]
[TD]Text[/TD]
[TD="align: right"]0.0089[/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Say I have this data set, is it possible create a formula that allows the lookup to find the last populated cell in the row and use that as the col_index_num?
I have been playing around max and column and managed to reference the column number of the last cell but cant seem to figure out how to use this in a lookup function.
Here is what I have so far:
=MAX(([the row selection]<>"")*(COLUMN([the row selection])))
It seems to work, but it relies on me manually selecting the row I want so wont work for a lookup function.
Thanks in advance!