Add a column to a selection

  • Thread starter Thread starter Pam
  • Start date Start date
P

Pam

I have a spreadsheet that has data in columns A - D in a
varying number of rows. It may or may not contain data
in Column E. I want to print columns A - E.

I can write a macro to select the data in columns A - D
using: Range (("A4"), range("D4").end(xlDown)).Select

How do I select this additional column (column E) also?
..
 
Hi Pam

Range(("A4"), Range("E" & Range("D4").End(xlDown).Row)).Select

You can use this to print this range

Range(("A4"), Range("E" & Range("D4").End(xlDown).Row)).PrintOut
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top