ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Traversing Rows (https://www.excelbanter.com/excel-programming/274856-re-traversing-rows.html)

Tom Ogilvy

Traversing Rows
 
assuming you mean a row of data

varr becomes a 1 by 1, 1 by 26 array.
Dim i as long, varr as variant, sStr as String
for i = 2 to 20
varr = Range(cells(i,1),cells(1,26)).Value
for j = 1 to ubound(varr,2)
sStr = sStr & varr(1,j) & ","
Next
debug.print i, sStr
sStr = ""
Next

--
Regards,
Tom Ogilvy

"Clarke Fielding" wrote in message
...
I am new at Excel VBA programming and I was wondering
what the best/efficient way of reading in all of the
columns of a given record into variables for processing
and then moving to the next row.

Any help will be appreciated.





All times are GMT +1. The time now is 02:27 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com