vba - Printing row cell values in Excel -
i print values in excel row. can row , select it, how loop through cells? or there row object can read?
range("a1").end(xlup).offset(1, 0).select until isempty(activecell) r = rows(activecell.row).entirerow.select each cell in r.cells debug.print cell.value next cell loop
i think doing do untilisempty(activecell)` isn't idea:
have empty cells followed non-empty cells.
how code work you?
sub print_some_values() dim c long dim r long dim max_col long r = activecell.row max_col = activesheet.usedrange.columns.count c = 1 activesheet.usedrange.columns.count debug.print activesheet.cells(r, c).value next c end sub
Comments
Post a Comment