Printing non-adjacent columns #3

Hi 

I know I can hide columns I don't want to print and I know 
I can use Group and Outline but that means I have to do 
this each time to the columns I want to print and they 
could be different each time in the spreadsheet - is there 
a quicker way using a macro or something?

Basically I have 45 columns and sometimes I want to print 
for example A:E,G,M-P,T and sometimes I want to print 
other combinations of columns.

Thanks

Ann
0
anncshaw (37)
2/16/2005 4:16:29 PM
excel.misc 78881 articles. 5 followers. Follow

1 Replies
472 Views

Similar Articles

[PageSpeed] 40

Record a macro when you hide your columns, print the worksheet, and unhide the
columns.

Then you could use that as the basis of your code to print the columns you need
to print.

This is what I ended up with (printpreview, though):

Option Explicit
Sub testme()
    Dim myRng As Range
    With ActiveSheet
        Set myRng = .Range("A:E,G:G,M:P,T:T")
        .UsedRange.Columns.Hidden = True
        myRng.EntireColumn.Hidden = False
        .PrintOut preview:=True
        .UsedRange.Columns.Hidden = False
    End With
End Sub

You could even add some buttons to the worksheet that were assigned to the
different "prints".



Ann Shaw wrote:
> 
> Hi
> 
> I know I can hide columns I don't want to print and I know
> I can use Group and Outline but that means I have to do
> this each time to the columns I want to print and they
> could be different each time in the spreadsheet - is there
> a quicker way using a macro or something?
> 
> Basically I have 45 columns and sometimes I want to print
> for example A:E,G,M-P,T and sometimes I want to print
> other combinations of columns.
> 
> Thanks
> 
> Ann

-- 

Dave Peterson
0
ec357201 (5290)
2/17/2005 1:18:02 AM
Reply:

Similar Artilces:

How do I freeze the widths of columns?
I'm trying to freeze the widths of columns so that when users of the worksheet are using it, they can't change the width. It's for editors who write headlines for specific areas that can only be as long as the column is wide or the text won't fit. One way is to right click on the cell, select 'format cells', select the 'allignment' tab, and select the 'wrap text' check box. The other way is to select 'format', 'column' and 'width'. This will not wrap the text but will keep the column at the width you specify. Hope this help...

Prevent publication from automatically changing from Print to Web
When saving a publication originally created in Print mode, Publisher 2003 seems to automatically change it to Web mode if a hyperlink was accidentally included in the publication (for instance, when the hyperlink is part of the text pasted from another document). When this happens a significant amount of reformatting occurs and it is very annoying to have to manually reconstruct the original print format for a large newsletter. Is there a way to prevent Publisher from automatically converting a publication from Print mode to Web mode? If not, is there some technical way to identify t...

Sorting Data in a column
I am trying to extract data that is in a single column to split it into 3 columns. The data is cyclic and has 3 variables, a time, a data point and a random number. These simply run abcabcabcabc down the column and i would like to get all of the a's into a column, all of the b's into another column and all of the c's into a third column. any ideas? VBA? Sub Test() Dim iLastRow As Long Dim i As Long iLastRow = Cells(Rows.Count, "A").End(xlUp).Row If iLastRow Mod 3 <> 1 Then iLastRow = iLastRow - 1 If iLastRow Mod 3 <> 1 Then iLastRow = iLa...

Exchange 5.5 to Exchange 2003 #3
Hello All Technology Colleges, I would like to ask for your assistance, and opinions on this, before I do a shotgun upgrade to my test lab. After completed reading MS Press Windows Server 2003 Administrator's companion book. I fell ready for the upgrade from Winnt4.0 domain to Win2K3 AD. But, I still feel there's an issue with the MS Exchange 5.5 migration toMS Exchange 2k3. What would be the best way for me to upgrade the MS Exchange 5.5 to Exchange 2003? I did some endless search on MS site for migration tools, and 3rd. party white paper, and found nothing going from Exchg.5.5 to 2k...

Spread sheets for keeping records of Art prints, printing & sales
Has anyone organized sales and production of fine art photographic prints. I need to keep listing of subjects name and address, mnodel release or not, and other information that comes up related to records I may need in the future. Thank you you dont need a spreadsheet - you need to look at a database "Hilary Sloane" <Hilary Sloane@discussions.microsoft.com> wrote in message news:E6ABEB72-7473-4139-9FA4-3001D50D74B9@microsoft.com... > Has anyone organized sales and production of fine art photographic prints. > I need to keep listing of subjects name and address, mn...

Print only current record
Using Access 2007. Hi all, I'm trying to figure out how to show a report only displaying the current record. I created a db using the Issues Database as a template. It has a form called Issue Details which has a button that prints a report of all issues. I created a new button and want to be able to print the same report but only with the record that is selected on the form. I searched the 'net and based on what I found I added this to the button's Click event: -------------------------------------- Private Sub Command188_Click() On Error GoTo Err_Command188_Click Dim MyFor...

Dynamic stacked column chart with ranking
Hi All, I would like to design a stacked column chart that stacks up supply based on ranking, from cheapest to most expensive, and to keep the same colors on any given day. the y axis will plot supply, and the x-axis will plot time (day 1, day 2, day 3 etc...) E.g. Day 1 Apples - supply 5, price 20p (color red on chart) Pears - supply 3, price 25p (color blue on chart) Bananas - supply 6, price 30p (color green on chart) So on Day 1, the stack will be from bottom to top, Apples (red), Pears (blue) and Bananas (green) (cheapest to most expensive) Day 2 Pears - supply 4, price 15p (co...

exchange crash #3
Hi I have got Exchange 2003 which worked till today. The effect of crash is strange because I can create account in Active Directory, I can logon to that account via OWA. But no mails can be sent as well as retrieved via e-mail client. I'm not sure if it' not effect of a trojan because it occured so suddenly. I've got NOD32 installed on this server and after collapse NOD32 was stopped. After restart it is up now. There are several interesting entries in Even Viewer: Process INETINFO.EXE (PID=1412). Topology Discovery failed, error 0x80040952. MS DTC could not correctly proc...

How to print CD/DVD labels on standard two-per-sheet paper?
Every time I download templates to print CD/DVD labels, I see only one label on a small sheet of paper. When I go to the office supply store, I only have the option of buying paper with the standard two-label design. How do I create and edit CD labels where I can work with both onscreen and then print both at once (different top from bottom) in such a way that everything is aligned with the cutout sticker labels on the page? Anytime you need to edit both halves of your label you need to setup the page manually. Most CD/DVD templates will print two to a page. Select the label you want...

autoreply #3
Hi all, I fillowed this article to set an autoreply rule, I want each messages received by a particular mailbox to autoreply with a predefined message. http://support.microsoft.com/?kbid=291956 My server does not use IMC just X400 connector to a central server. thx If you don't use Exchange Server, you can use Outlook Rules Wizard or one of the third-party automatic rules processing addins. See http://www.slipstick.com/rules/index.htm and http://www.slipstick.com/addins/index.htm . -- Sue Mosher, Outlook MVP Author of Microsoft Outlook Programming - Jumpstart for Adm...

3 Criteria Lookup
Lbs Scale Code Lbs > < USA 225 EU USA JAPON 1 75 98.00 115.00 98.00 76 99 0.25 0.26 0.35 100 1099 0.30 0.31 0.49 1101 1199 0.45 0.46 0.57 1200 4400 0.78 0.79 0.90 I am looking for a formula that would find the value under code (in this case USA) and then find the value under lbs (in this case 225) from the lbs scale range and provide the cost per pound (in this case . 31) Please keep in mind that corresponding value on the rate range must be exact, otherwise it will calculate the wrong rate times the number of pounds, resulting in over/uder billing amount. Your input will be great...

Macro from cell specific to whole column
Hello All, I have recorded the following macro... ActiveCell.FormulaR1C1 = "=RIGHT(RC[-3],1)" Range("O286").Select ActiveCell.FormulaR1C1 = "=IF(RC[-1]=""-"",(LEFT(RC[-4],15)*-1),RC[-4])" that basically takes a text stored number such as 100.54- to -100.54. What I want to do is make this auto fill for the entire column. How should rewrite it? -- Thanks for all of the help. It is much appreciated!!!! On May 26, 5:06=A0am, Bean Counter <BeanCoun...@discussions.microsoft.com> wrote: > Hello All, > ...

Update CRM From Rollup 2 to Rollup 3
Hi!.. I want to update MS CRM from rollup 2 to rollup 3. ¿What I need to update first, The server or the outlook clients? If the server is first updated, ¿Will the outlook clients (with rollup 2) still works with a rollup 3 CRM server?...This is because updating 50 clients may take a week and I want to know if the users will have problems untill we complete the update task. Thanks for your help... Daniel. ...

Pivot Table
As with a previous question, I have a large set of data (20,000 rows and about 100 coulmns). I wish to select about 60 columns to place in pivot "data" (along with others into "Rows"). Is there a way to select multiple columns (say all 60?) and move into "Data" in one step? Are there add-ins that help with this? Doing all 60 is possible but slow and somewhat error prone. Thanks in advance. Hi Johnny The following code should get you started on what you want to do. In this example the first column of source data is added to Page area, the seco...

Non-Automatic Link Updating in Excel 2003
I wrote a large system of about 30 Excel workbooks that are all linked together in various ways. I've been using this sytem for several years under Excel 2000. I just got Excel 3000 (XP), and to my disbelief, every time I open a workbook, I have to digress and answer questions about the link updating. If I go into Edit->Links I see the usual (with some new features) links window. I checked the box that says to do the updating automatically. I selected the option that says to always update the links and DO NOT present me with a popup message asking me if I want to. These two ite...

Access Form Printing issue
Hi Guys, I have an issue wiht ACCESS Form printing. One Form with Pivot table with 50+ pages, when I do a print preview, It shows me 50+ pages, but after 36th page, all following pages are empty. And when do the printing, all pages after 36, are empty too. Any suggestion would be appriciated. Thanks Tony Forms aren't intended for printing. That's what reports are for. There's very little built into Access to allow you to manipulate how a form prints. -- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no private e-mails, please) "Tony" <Tony@discu...

2 or more columns on a report
I have a report that has only a couple of fields that it's pulling from, so when I print my report, there's not a lot there. It looks basically like this: Employee Name Avg. Score # Completed Doe, John 95 2 Smith, Mary 68 3 and so on. My question is this: Is there a way to put 2 groups of this info on the report page to condense the number of pages I have to print out? I'd like to report to look something like this: Employee name Avg. Score # Completed Employee Name Avg. Score # Completed ...

Duplicate cells #3
I have a large spreadsheet consisting of about 16,000 rows and 8 columns. The first columns are longitude and latitude coordinates. Is there a way to sort and display the rows where both the values in columns A and B are the same? I have sorted on A then B but sometimes places have exactly the same longitude but very different latitudes. I'm just trying to eliminate the necessity of going through all 16000 entries to eliminate duplicates. Thanks, Rick Morrison rlmorrison@earthlink.net Rick, Chip Pearson is the dupe guru. There's some stuff at his site on duplicates. w...

Outlook 2003 and Active Sync 3.7.1
Are there any known issues upgrading from Outlook 2002 to 2003 if you have a pocket PC and active sync 3.7.1? I have had a lot of trouble with the active sync product but it has now worked faithfully for a week, which is a new record. I don't want it to break with a new version of Outlook. active sync 3.7.1 is working fine for me under outlook 2003. however i've never done an upgrade of office. i always do a complete uninstall of the previous version, reboot, and then install the new version or just go with a clean install of operating system + office. -- Neo [MVP Outlook] ...

Sum Columns with code, column s vary in length
I am trying to SUM some columns. The only problem is the columns are not always the same length. I have overcome this by using the following code: Range(ActiveCell, ActiveCell.Offset(-1, -1).End (xlUp).Offset(3, 1)).Select This selects all values in a column. Can anyone help in adding the code to sum the selected values above? Thanks for any help Simon ActiveCell = Application.Sum(Range(ActiveCell, ActiveCell.Offset(-1, -1).End(xlUp).Offset(3, 1))) >-----Original Message----- >I am trying to SUM some columns. The only problem is the >columns are not always the same length. I...

Sorting by number in a non-numeric field
Hi guys.. so question.. Say I have a row with example: Building1-PC1 Building2-PC1 Building3-PC1 Building1-PC2 Building2-PC2 Building3-PC3 Building1-PC100 Building2-PC100 Building3-PC100.. Desired result from a sort.. Building1-PC1 Building1-PC2 Building1-PC3 Building2-PC1 Building2-PC2 Building2-PC3 Building3-PC1 Building3-PC2 Building3PC-3 Now how do I get there? :P -- kronik ------------------------------------------------------------------------ kronik's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=31541 View this thread: http://www.excelforum.com/s...

statement print-out only open balances
Hello Hope someone can help I need to remove all details of transactions with zero balance (paid) from the list On my bi-monthly closing statements, and show only the transactions with an open balance. We have customer with a large history and the statements get very large. I have a statement that only prints this month’s activity, but I still need the old open transactions thanks this works great :) "Morris Paint" wrote: > See if this will do what you need. You may have to make some modifications > to the text on it but I think it will work. We ran into the same issu...

apostrophe replaced by multiple symbols when email is printed
Windows XP - Exchange 2003 - Outlook 2003 In some cases when a person in our office sends emails to others in our office and those people then print the email, the apostrophes are replaced by a string of characters like: []$B!G[](B where [] is the nonprinting character symbol. Something very similar is printed in place of an arrow symbol. He recently installed a Japanese language pack. I've checked the Control Panel > Language settings and also the language settings in Outlook and couldn't see anything obviously wrong. I've also deleted his user profile and reinstall...

Selective report printing please help
Hi Under Transactions menu > Financials > Series post Say i check mark 2 or 3 records and post them I want to selectively print eg - 1st page of report ok print , 2nd page not required. etc Rick Unfortunately, what you want to do is not possible. -- Charles Allen, MVP "Rick" wrote: > Hi > > Under Transactions menu > Financials > Series post > Say i check mark 2 or 3 records and post them > I want to selectively print eg - 1st page of report ok print , 2nd page not > required. > etc > > Rick ...

Can't print a monthly calendar
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel Email Client: imap Hi, <br> I have a problem with printing a monthly calendar from my older computer using OS X 10.4. <br> When I try to print, the usual dialog box comes up, but there is no preview and it doesn't matter whether I try to print, save as PDF (save box comes up), preview or anything, nothing happens. <br> I press print, save, preview and the dialog box disappears and that's all. <br> No error, no nothing. <br> I can print emails etc from the same applica...