Column number of last column that returns value ignore formulas
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
Hi isabelle,
You code lines work as you would expect, thanks.
My problem is folding them into my code to my satisfaction. The values that will show in the cells are the time of day for sign IN and sign OUT.
Formulas go from column D to column W.
So a row will be a sign in time, then a sign out time and so on over to column W.
When a sign in time is entered (on another sheet) the formula will return that time to this row and if it is an IN time then the row from column A to that IN time is filled with green. If the time returned by the formula is a OUT time then the row from Column A to that OUT time is filled with red.
I am having a tiny bit of success with the green but does not display consistently for some reason. And with identical code for the red fill I get nothing.
Thanks for the code lines, at least I can count on them if I give them proper direction with my code.
Howard
|