Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Print Selected Range

Hi

I have a sheet ("Printing) which is populated from another sheet
("Data") which is updated by the users.

Not all the rows in the "Printing" sheet will be populated hence I
would like to print only the rows with date in it. All my rows (from
b6 to b3000) are filled with formula in it.

Could anyone please help me how to run print command so it only pick
up rows with data in it ?

Thanks,
Naeem
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Print Selected Range

And you don't want to print the rows after the last entry in column b that is
not "".

If yes, then you can try this technique:
(saved from a previous post, you'll have to change the ranges)

If those formulas appear at the end of the data and you don't want to use
autofilter...

If I can pick out a column indicates if that row is used or not, then I like
this technique:

(I used column A in my sample, but you can use any column you want.)

Insert|Name|Define
Names in workbook: Sheet1!LastRow
Use this formula
Refers to: =LOOKUP(2,1/(Sheet1!$A$1:$A$1000<""),ROW(Sheet1!$A$1:$A$1000) )

(Make that 1000 big enough to extend past the last possible row.)

Then once mo
Insert|Name|Define
Names in workbook: Sheet1!Print_Area
Use this formula
Refers to: =OFFSET(Sheet1!$A$1,0,0,lastRow,3)

That last 3 represents the last column to print (A:C in my example).

And change the worksheet (sheet1) if necessary (in all the places).

Ps. If you go into file|page setup, you may find that the print range is
changed to a specific range. And you'll have to reapply the Print_Area name.

Naeem wrote:

Hi

I have a sheet ("Printing) which is populated from another sheet
("Data") which is updated by the users.

Not all the rows in the "Printing" sheet will be populated hence I
would like to print only the rows with date in it. All my rows (from
b6 to b3000) are filled with formula in it.

Could anyone please help me how to run print command so it only pick
up rows with data in it ?

Thanks,
Naeem


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 13
Default Print Selected Range

On Apr 23, 12:09*pm, Dave Peterson wrote:
And you don't want to print the rows after the last entry in column b that is
not "".

If yes, then you can try this technique:
(saved from a previous post, you'll have to change the ranges)

If those formulas appear at the end of the data and you don't want to use
autofilter...

If I can pick out a column indicates if that row is used or not, then I like
this technique:

(I used column A in my sample, but you can use any column you want.)

Insert|Name|Define
Names in workbook: *Sheet1!LastRow
Use this formula
Refers to: *=LOOKUP(2,1/(Sheet1!$A$1:$A$1000<""),ROW(Sheet1!$A$1:$A$1000) )

(Make that 1000 big enough to extend past the last possible row.)

Then once mo
Insert|Name|Define
Names in workbook: *Sheet1!Print_Area
Use this formula
Refers to: *=OFFSET(Sheet1!$A$1,0,0,lastRow,3)

That last 3 represents the last column to print (A:C in my example).

And change the worksheet (sheet1) if necessary (in all the places).

Ps. *If you go into file|page setup, you may find that the print range is
changed to a specific range. *And you'll have to reapply the Print_Area name.





Naeem wrote:

Hi


I have a sheet ("Printing) which is populated from another sheet
("Data") which is updated by the users.


Not all the rows in the "Printing" sheet will be populated hence I
would like to print only the rows with date in it. All my rows (from
b6 to b3000) are filled with formula in it.


Could anyone please help me how to run print command so it only pick
up rows with data in it ?


Thanks,
Naeem


--

Dave Peterson- Hide quoted text -

- Show quoted text -


Hi Dave,

I am a little confused. Sorry about that.

Do I have to name the last row (in my case 3000) using Insert/Name/
Define and then call it anything.

And the formula Refers to: =LOOKUP(2,1/(Sheet1!$A$1:$A$1000<""),ROW
(Sheet1!$A$1:$A$1000)) , where does it go on the sheet ?

Thanks,
Naeem
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Print Selected Range

Use
Insert|Name
(xl2003 menus)
to insert the name.

type those formulas into the Refers to box.

It's a named formula and it'll change depending on what the data in your
worksheet looks like.

You will have to change the name of the sheet in the formula to Printing.

Naeem wrote:

Hi Dave,

I am a little confused. Sorry about that.

Do I have to name the last row (in my case 3000) using Insert/Name/
Define and then call it anything.

And the formula Refers to: =LOOKUP(2,1/(Sheet1!$A$1:$A$1000<""),ROW
(Sheet1!$A$1:$A$1000)) , where does it go on the sheet ?

Thanks,
Naeem


--

Dave Peterson
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
Print preview and print only shows 2/3 of page selected Financial planner Excel Discussion (Misc queries) 1 January 9th 07 06:26 PM
Print selected range in a worksheet tikchye_oldLearner57 Excel Discussion (Misc queries) 2 September 29th 06 07:19 PM
How do I print a workbook in but only print selected worksheets? Karl S. Excel Discussion (Misc queries) 1 August 31st 06 12:34 AM
Macro to find empty cell and select range to print selected. [email protected] Excel Programming 1 May 15th 06 09:05 AM
Macro to print a selected range, not entire worksheet James C Excel Discussion (Misc queries) 3 October 19th 05 10:12 PM


All times are GMT +1. The time now is 08:20 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"