View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Issue with setting Range

One way:

With Sheets("Member ID Report Master")
Set salesrange = .Range(.Cells(2, 4), _
.Cells(.Rows.Count, 4).End(xlUp))
End With



In article ,
robs3131 wrote:

Hi,

I'm trying to set a range to be equal to cell D2 through the last cell in
the column with a value (prior code ensures there will be no empty cells
between cell D2 and the last cell in column D with a value). I've tried the
following code which is not working...any idea how to do this?

With Sheets("Member ID Report Master")
Set Q = .Range("D2")
Set salesrange = .Range(Q, Q.End(x1down))
End With