Column number of last column that returns value ignore formulas
hi,
lastcell= Evaluate("MIN(IF(A3:W3="""",COLUMN(A3:W3)))-1")
also with a variable
i = 3
x = Evaluate("MIN(IF(A" & i & ":W" & i & "="""",COLUMN(A" & i & ":W" & i & ")))-1")
isabelle
Le 2014-05-27 17:15, L. Howard a écrit :
That last used column in row 3 is always column W as that is as far to the right the formulas go. D to W are all formulas,
some will have values returned some will not. This is a changing thing with
other activity in the workbook.
If column H is the last cell to returns a value, that is the column number I want. Cells past H on over to W with no values showing are ignored.
I will then use that column number in a resize code to color fill the row from column A to that returned value in H.
Next time it may column R is the last occurring value.
I'm looking for help because I can't make the code ignore a cell with a formula but showing NO value but recognize a cell with a value showing.
I'll test your code to make sure it does or does not do what I am looking for.
Thanks.
Howard
|