View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.programming
ManhattanRebel ManhattanRebel is offline
external usenet poster
 
Posts: 85
Default Create Named Ranges (Headers) - then using range name in formu

Everything is on the same worksheet. Still get the Method 'Range of Object'
_Global' failed error, even after doing what you suggested. Don't know
what's going on.


"Dick Kusleika" wrote:

On Fri, 1 Aug 2008 16:09:01 -0700, ManhattanRebel
wrote:

I am getting a "Range of Object'_Global' error 1004 when I use this formula:
Range(Cells(i, "CC")).Resize(, 2).Cut Destination:=Intersect(Rows(i),
Range("Red One").EntireColumn)

Do I have to specify which worksheet I'm using for the destination? The
sheet is "Color". Where and how should I specify that, if necessary?
Thx.


You don't *have* to, but you should. If you don't, it assumes the active
sheet. I assumed both the copied cells and the destination are on the same
sheet.

Dim sh As Worksheet

Set sh = ThisWorkbook.Sheets("Color")

sh.Cells(i,"CC").Resize(,2).Cut Intersect(sh.Rows(i), sh.Range("Red
One").EntireColumn)

Make sure that last bit is all on one line.
--
Dick Kusleika
Microsoft MVP-Excel
http://www.dailydoseofexcel.com