View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default For each....that is not blank

How about just ignore the blanks, but still loop through them:

for each c in sheets("inventory").range("B2:B12").cells
if c.value = "" then
'do nothing, skip it
else
'do the real work here
end if
next c


Aria wrote:

Hello,
How do you change this line to become For Each c in the range of B2 to
B12 that is Not Blank?

For Each c In Sheets("Inventory").Range("B2:B12")

:) Aria

*** Sent via Developersdex http://www.developersdex.com ***


--

Dave Peterson