View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Lars-Åke Aspelin[_2_] Lars-Åke Aspelin[_2_] is offline
external usenet poster
 
Posts: 913
Default Need help with cells Array

On Thu, 7 Aug 2008 11:44:02 -0700, Ayo
wrote:

For Each sht In Sheets(Array("NSB West 2008", "NSB West 2009", "NSB East
2008", "NSB East 2009", "NSB Manhattan"))

I am trying to use the line of code below, just like the one above but I am
getting a Method 'Range' of object '_Global' failed. Any ideas?
Thanks.

For Each c In Range(Array("D8", "F8", "H8", "J8", "L8")).Cells



Try this instead:

For Each c in Array(Range("D8"),Range("F8"),Range("J8"),Range("L 8"))

Hope this helps / Lars-Åke