View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Ron Rosenfeld Ron Rosenfeld is offline
external usenet poster
 
Posts: 5,651
Default vba code to cycle through each column in a sheet

On Thu, 16 Sep 2004 11:31:07 -0700, "David"
wrote:

How to I progammatically determine the number of non-empty columns in a
sheet and then loop through each of these columns?


No need to determine in advance. As you get to each column, test to see if
there is any data in the first row. If that cell is empty, exit your loop.


--ron