![]() |
Syntax error.
how does the for each cell in range synax work? I have the
following For Each Cell In Range("I3:I9") If Cell.Value = "" Then 'code Next cell which is saying that cell is empty? thanks so much |
Syntax error.
It loops through the cells in the specified range one at a time and performs
the code contained within the loop structure against each cell. -- Regards, Tom Ogilvy "David McNally" wrote in message ... how does the for each cell in range synax work? I have the following For Each Cell In Range("I3:I9") If Cell.Value = "" Then 'code Next cell which is saying that cell is empty? thanks so much |
Syntax error.
David,
It takes each cell ion the specified range one at a time and executes the code between the For and the next upon that cell. So first time through, cell will refer to I3, 2nd it will refer to I4, etc. Don't forget your End If. -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "David McNally" wrote in message ... how does the for each cell in range synax work? I have the following For Each Cell In Range("I3:I9") If Cell.Value = "" Then 'code Next cell which is saying that cell is empty? thanks so much |
All times are GMT +1. The time now is 06:24 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com