I'm working with an application where I have a table of multiple rows each with 384 columns. Data in each row is filled with either a text string, or with "" nulls. I need to find the first column that has more than n consecutive nulls. I'd prefer this to be a formula rather than a macro. I've tried to do this with Offset(), but I can't find a good way to generate the offset distance without nesting it multiple times.
My current attempt is as follows, but this only gets me past the first set of nulls with the minimum quantity of nulls is defined in $J$1:
=IF(COUNTIF(OFFSET(K3:OE3,0,MATCH("",K3:OE3,0)-1,1,19),"")<$J$1,XLOOKUP("",OFFSET(K3:OD3,0,COUNTIF(OFFSET(K3:OE3,0,MATCH("",K3:OE3,0)-1,1,19),"")+MATCH("",K3:OE3,0)-1),OFFSET(K2:OD2,0,MATCH("",K3:OE3,0)-1+COUNTIF(OFFSET(K3:OE3,0,MATCH("",K3:OE3,0)-1,1,19),"")),"None",0,1)&","&COUNTIF(OFFSET(K3:OE3,0,MATCH("",OFFSET(K3:OD3,0,MATCH("",K3:OE3,0)-1+COUNTIF(OFFSET(K3:OE3,0,MATCH("",K3:OE3,0)-1,1,19),""),1,32),0)+COUNTIF(OFFSET(K3:OE3,0,MATCH("",K3:OE3,0)-1,1,19),"")+MATCH("",K3:OE3,0)-1-1,1,25),""),XLOOKUP("",K3:OE3,$K$2:$OE$2,"None",0,1)&","&COUNTIF(OFFSET(K3:OE3,0,MATCH("",K3:OE3,0)-1,1,19),""))
Any help will be appreciated
My current attempt is as follows, but this only gets me past the first set of nulls with the minimum quantity of nulls is defined in $J$1:
=IF(COUNTIF(OFFSET(K3:OE3,0,MATCH("",K3:OE3,0)-1,1,19),"")<$J$1,XLOOKUP("",OFFSET(K3:OD3,0,COUNTIF(OFFSET(K3:OE3,0,MATCH("",K3:OE3,0)-1,1,19),"")+MATCH("",K3:OE3,0)-1),OFFSET(K2:OD2,0,MATCH("",K3:OE3,0)-1+COUNTIF(OFFSET(K3:OE3,0,MATCH("",K3:OE3,0)-1,1,19),"")),"None",0,1)&","&COUNTIF(OFFSET(K3:OE3,0,MATCH("",OFFSET(K3:OD3,0,MATCH("",K3:OE3,0)-1+COUNTIF(OFFSET(K3:OE3,0,MATCH("",K3:OE3,0)-1,1,19),""),1,32),0)+COUNTIF(OFFSET(K3:OE3,0,MATCH("",K3:OE3,0)-1,1,19),"")+MATCH("",K3:OE3,0)-1-1,1,25),""),XLOOKUP("",K3:OE3,$K$2:$OE$2,"None",0,1)&","&COUNTIF(OFFSET(K3:OE3,0,MATCH("",K3:OE3,0)-1,1,19),""))
Any help will be appreciated