How do I get the index in a VBA For Each Loop (programming with Excel)? -
i working excel vba process data , here want make:
in sheet, want create function "getdebutdate" can automatically calculate first date row has value.
for example, in row of "mark", first time value aug-05 number of "4".
i know few vba , after searching around found can use for ... each
loop in range. how index of "v" in each loop? after index, how value of date in head row?
function get_board_count(range range) each v in range .... next get_board_count = .... end function
you can alternatively use excel-only solution, doesn't need vba programming. have formula:
=indirect(address(1,match(true,index(a2:e2>0,0),0)))
match(true,index(a2:e2>0,0),0)
looks first value greater 0 , not null , returns current column index of value. rest of formula refers row, dates, wanted date per reference. in case first row...
Comments
Post a Comment