empty cell in a colomn

  • Thread starter Thread starter Khalil Handal
  • Start date Start date
K

Khalil Handal

Hi,
I have work sheet for monthly expences. For each month i enter data day by
day starting B7. Each month is diferent from the previous month( B100 for
Jan. and B60 for February).
I need to create a macro (will run when click on a buton on the sheet) to
print the range from A7:E???
Where ??? refers to the last line in colomn B.

What is the code that should be used in the macro (using VBA) to determin
the first empty row in colomn B and use it to print these daily expences.

Hope I'm clear.

Khalil Handal
 
range("B65536").End(xlUp).Offset(1,0)
is the first blank cell after the last filled cell in column B

Manges
 
This will set the range variable rng to A7:En where n is the row of the last
used cell in column B

Set rng = Range(Cells(7, 1), Cells(Range("B65536").End(xlUp).Row, 5))
 
Thanks for for the info, another thing please:

to print the range i will use something like:
selection.printout
or rng printout
???

can u help
Khalil
 
Back
Top