View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Barb Reinhardt Barb Reinhardt is offline
external usenet poster
 
Posts: 3,355
Default early beginner, simple question about End(xlUp)

Set BottomCel = Range("A65536").End(xlUp)

This goes to the bottom of column A and finds the first filled cell.
BottomCel is set to that cell

iEndRow = Sheets(4).Range("B2").End(xlDown).Row


Works on the 4th worksheet in the workbook. If you have something in
B2:B15, nothing in B16 or B17 and then something in B18, iEndRow will return
15.

HTH,
Barb Reinhardt



"wbrowse" wrote:

Hi,

Does the following tells Excel or Vba to assign the lastest bottom
cell in the range A:A to BottomCell. In other words, is it a single
cell being taken in consideration or is it a range? Because for me,
from A65526 to xlUp, wherever is xlup it is a range.

Still about that entrie below, could this object be a mulitple column
range? Or the fact that "A" is mentionned in A65536 tells Vba to look
in A column only?

Set BottomCel = Range("A65536").End(xlUp)

What about this way to do it?

iEndRow = Sheets(4).Range("B2").End(xlDown).Row
Sheets(4).Range("D4:D" & iEndRow)

===========end of simple question===========

============thanks for your help============