![]() |
Do while empty colomn
Guys
Is there a way to to run a macro until it encounters a colomn with n information in any cell? Thanks for hel -- Message posted from http://www.ExcelForum.com |
Do while empty colomn
One way
Sub rununtil() i = 1 Do Until Application.CountA(Columns(i)) = 0 MsgBox Cells(1, i) i = i + 1 Loop End Sub -- Don Guillett SalesAid Software "axg275 " wrote in message ... Guys Is there a way to to run a macro until it encounters a colomn with no information in any cell? Thanks for help --- Message posted from http://www.ExcelForum.com/ |
Do while empty colomn
Dim col As Range
Dim cCount Dim i As Long Do i = i + 1 cCount = WorksheetFunction.CountA(Columns(i)) If cCount 0 Then 'do your stuff End If Loop Until cCount = 0 -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "axg275 " wrote in message ... Guys Is there a way to to run a macro until it encounters a colomn with no information in any cell? Thanks for help --- Message posted from http://www.ExcelForum.com/ |
All times are GMT +1. The time now is 01:29 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com