Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
pam pam is offline
external usenet poster
 
Posts: 11
Default Add a column to a selection

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?
..


  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Add a column to a selection

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


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Pam" wrote in message ...
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?
.




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Macro help - add column selection HeatherJ Excel Worksheet Functions 1 June 4th 10 02:35 PM
Copy Selection - Transpose Selection - Delete Selection Uninvisible Excel Discussion (Misc queries) 2 October 23rd 07 04:18 PM
Automate column selection Snoopy Setting up and Configuration of Excel 1 January 27th 06 03:26 PM
Last column in selection Lawlera Excel Programming 7 April 19th 04 12:40 PM
Macro column selection Vispy Excel Programming 4 November 29th 03 08:56 PM


All times are GMT +1. The time now is 01:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"