![]() |
definition of the range containing content
Dear experts,
how can I, in a worksheet, define the range that spans ONLY that part of the table, that does contain content ('value'). I want compare the entries of a table with each other, using a loop that runs through it, but stops at the last entry. Thank you Martin |
definition of the range containing content
If they are constants, you could use
Set rng = Range("A1:M100").SpecialCells(xlCellTypeConstants) For Each cell in rng ... Next cell -- HTH RP (remove nothere from the email address if mailing direct) "Martin" wrote in message ... Dear experts, how can I, in a worksheet, define the range that spans ONLY that part of the table, that does contain content ('value'). I want compare the entries of a table with each other, using a loop that runs through it, but stops at the last entry. Thank you Martin |
definition of the range containing content
Martin,
There are a number of different ways, the best depends on the structure of your workbook. Here are a few: Dim myCell As Range For Each myCell In Range("A1").CurrentRegion.Cells For Each myCell In Range("A1:D100").SpecialCells(xlCellTypeConstants) For Each myCell In Range("A1", Range("D65536").End(xlUp)) HTH, Bernie MS Excel MVP "Martin" wrote in message ... Dear experts, how can I, in a worksheet, define the range that spans ONLY that part of the table, that does contain content ('value'). I want compare the entries of a table with each other, using a loop that runs through it, but stops at the last entry. Thank you Martin |
All times are GMT +1. The time now is 03:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com