View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
csbennett csbennett is offline
external usenet poster
 
Posts: 2
Default Determine Column

Thank you. That helps!

"Bob Phillips" wrote:


iLastRow = Cells(Rows.Count,"A").End(xlUp),Row
For i = 1 to iLastRow
myVar = Cells(i,"A").Value
Next i

This is incomplete, as I assume you will do something with myVar, but
hopefully it will get you started.

--
HTH

Bob Phillips

"csbennett" wrote in message
...
I need to loop through all the rows in a spreadsheet and load the data

into
various
columns in a table. How do I refer to each column in each row without

hard
coding the row number? For instance, in each row I loop through I want to
save off column A into a variable. I need to know how to code that.

Thanks.