View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
bpeltzer bpeltzer is offline
external usenet poster
 
Posts: 171
Default Getting Compile error - on this line

Not sure about the & ")" at the end... I think you just need the closing
paren, since the paren isn't part of the string argument of the range
function:
Set rng = Range("D2:D" & cells(rows.count,"D").end(xlUp).row )


"Jim May" wrote:

Set rng = Range("D2:D"&Cells(rows.count,"D").end(xlUp).row & ")"

When I extract only
Cells(rows.count,"D").end(xlUp).row and drop it in the Immediate window
preceeded with a ?

I get 9 << the correct row number

Can someone assist?