ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   vba code to cycle through each column in a sheet (https://www.excelbanter.com/excel-programming/310193-re-vba-code-cycle-through-each-column-sheet.html)

Ron Rosenfeld

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


All times are GMT +1. The time now is 05:37 PM.

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