Preventing Column Cell Values from Printing

I have a summary worksheet with several columns of information.

There is one particular column (E25:F39) where I don't always want to print
the values.  Is there some simple way to toggle this column's values on and
off just before hitting the print command?

I was thinking of using an adjacent tick box outside the print area, which
when ticked would print the column values, and vice-versa.

I'm looking for a formula that would examine the tick box, and if the tick
(letter 'a' in Marlett font) is not present (i.e. cell value = ""), then the
values in column (E25:F39) would be hidden or inhibited in some way so that
the cells print blank.

Or, is there a better way of achieving this?

TIA
-- 
Mike
-Please remove 'safetycatch' from email address before firing off your 
reply-



0
2/25/2008 6:18:42 PM
excel 39879 articles. 2 followers. Follow

10 Replies
487 Views

Similar Articles

[PageSpeed] 8

Here is an event macro.  It examines cell A1 every time the cell is changed.  
If the value is "a", then the color of the font of the range of interest is 
set to black.  If the value put in A1 is not "a", then the font color is set 
to white.  White-on-white is like hiding the cells.


Because it is worksheet code, it is very easy to install and use:

1. right-click the tab name near the bottom of the window
2. select View Code - this brings up a VBE window
3. paste the stuff in and close the VBE window

If you save the workbook, the macro will be saved with it.

To remove the macro:

1. bring up the VBE windows as above
2. clear the code out
3. close the VBE window

To learn more about macros in general, see:

http://www.mvps.org/dmcritchie/excel/getstarted.htm

To learn more about Event Macros (worksheet code), see:

http://www.mvps.org/dmcritchie/excel/event.htm


-- 
Gary''s Student - gsnu2007d


"mlv" wrote:

> I have a summary worksheet with several columns of information.
> 
> There is one particular column (E25:F39) where I don't always want to print
> the values.  Is there some simple way to toggle this column's values on and
> off just before hitting the print command?
> 
> I was thinking of using an adjacent tick box outside the print area, which
> when ticked would print the column values, and vice-versa.
> 
> I'm looking for a formula that would examine the tick box, and if the tick
> (letter 'a' in Marlett font) is not present (i.e. cell value = ""), then the
> values in column (E25:F39) would be hidden or inhibited in some way so that
> the cells print blank.
> 
> Or, is there a better way of achieving this?
> 
> TIA
> -- 
> Mike
> -Please remove 'safetycatch' from email address before firing off your 
> reply-
> 
> 
> 
> 
0
GarysStudent (1572)
2/25/2008 7:00:07 PM
Here is the code:

Private Sub Worksheet_Change(ByVal Target As Range)
Set a = Range("A1")
If Intersect(Target, a) Is Nothing Then Exit Sub
Set rr = Range("E25:F39")
Application.EnableEvents = False
For Each r In rr
    If a.Value = "a" Then
        r.Font.ColorIndex = 0
    Else
        r.Font.ColorIndex = 2
    End If
Next
Application.EnableEvents = True
End Sub
-- 
Gary''s Student - gsnu2007d


"mlv" wrote:

> I have a summary worksheet with several columns of information.
> 
> There is one particular column (E25:F39) where I don't always want to print
> the values.  Is there some simple way to toggle this column's values on and
> off just before hitting the print command?
> 
> I was thinking of using an adjacent tick box outside the print area, which
> when ticked would print the column values, and vice-versa.
> 
> I'm looking for a formula that would examine the tick box, and if the tick
> (letter 'a' in Marlett font) is not present (i.e. cell value = ""), then the
> values in column (E25:F39) would be hidden or inhibited in some way so that
> the cells print blank.
> 
> Or, is there a better way of achieving this?
> 
> TIA
> -- 
> Mike
> -Please remove 'safetycatch' from email address before firing off your 
> reply-
> 
> 
> 
> 
0
GarysStudent (1572)
2/25/2008 8:23:04 PM
"Gary's Student" wrote:
>
> Here is an event macro.  It examines cell A1 every time the cell is 
> changed.
> If the value is "a", then the color of the font of the range of interest 
> is
> set to black.  If the value put in A1 is not "a", then the font color is 
> set
> to white.  White-on-white is like hiding the cells.

Thanks Gary.  Does 'white on white' prevent the values in the cells 
printing?  Other programmes I use (specifically CAD progs) automatically 
print white text as black.

I don't run a white background on my computer (I run a light magnolia so I 
can see sneaky hidden white text in emails and on Web pages  ;-), so I will 
still see the values in the cells when the text is set to white.
-- 
Mike
-Please remove 'safetycatch' from email address before firing off your 
reply- 


0
2/26/2008 8:58:22 AM
Set the text color to light magnolia.


Gord Dibben  MS Excel MVP

On Tue, 26 Feb 2008 08:58:22 -0000, "mlv" <mike.safetycatchvincent@jet.co.uk>
wrote:

>I don't run a white background on my computer (I run a light magnolia so I 
>can see sneaky hidden white text in emails and on Web pages  ;-), so I will 
>still see the values in the cells when the text is set to white.
>-- 

0
Gord
2/26/2008 9:51:16 PM
Gord Dibben wrote:
>
>> I wrote:
> >
>> I don't run a white background on my computer (I run a light magnolia
>> so I can see sneaky hidden white text in emails and on Web pages  ;-)
>> so I will still see the values in the cells when the text is set to 
>> white.
>
> Set the text color to light magnolia.

There's no need as being able to see the white text against a light magnolia 
background is not an issue (anyway, other people using the worksheet do run 
a white background).

My question was whether setting the text colour to white would stop the text 
printing.  Magnolia text would print, and defeat the purpose of the exercise 
(see original post).
-- 
Mike
-Please remove 'safetycatch' from email address before firing off your 
reply- 


0
2/27/2008 2:28:20 PM
If you print in color I don't see how magnolia text on a magnolia background
would be visible.


Gord

On Wed, 27 Feb 2008 14:28:20 -0000, "mlv" <mike.safetycatchvincent@jet.co.uk>
wrote:

>My question was whether setting the text colour to white would stop the text 
>printing.  Magnolia text would print, and defeat the purpose of the exercise 
>(see original post).

0
Gord
2/27/2008 5:14:47 PM
Gord Dibben wrote:
>
> If you print in color I don't see how magnolia text on
> a magnolia background would be visible.

'cos the magnolia background I referred to is the Windows background colour 
set on my 'puter screen (control Panel/Display/Display 
Properties/Advanced/Window/R244,G245,B203), it's not a background colour set 
in Excel, or the colour of the paper I use, which is standard white  ;-)
-- 
Mike
-Please remove 'safetycatch' from email address before firing off your 
reply- 


0
2/28/2008 4:06:17 PM
I see.

I thought you were referring to the background color of the cell as in
Format>Cells>Patterns


Gord

On Thu, 28 Feb 2008 16:06:17 -0000, "mlv" <mike.safetycatchvincent@jet.co.uk>
wrote:

>Gord Dibben wrote:
>>
>> If you print in color I don't see how magnolia text on
>> a magnolia background would be visible.
>
>'cos the magnolia background I referred to is the Windows background colour 
>set on my 'puter screen (control Panel/Display/Display 
>Properties/Advanced/Window/R244,G245,B203), it's not a background colour set 
>in Excel, or the colour of the paper I use, which is standard white  ;-)

0
Gord
2/28/2008 8:31:06 PM
You may find, depending on the printer settings, that the white text will 
still print out as black. I came across this issue a long time ago and ISTR 
that if the printer driver was set to print black/white (rather than 
colour), then the white text still printed.

An alternative might be to have other cells outside the print area holding 
the data, then a formula in the printable cell that inserts the data if the 
tickbox is checked. Something like =if(tickboxcell="a",datacell,"")

Ian

"mlv" <mike.safetycatchvincent@jet.co.uk> wrote in message 
news:fq3s2a$8nm$1@north.jnrs.ja.net...
> Gord Dibben wrote:
>>
>>> I wrote:
>> >
>>> I don't run a white background on my computer (I run a light magnolia
>>> so I can see sneaky hidden white text in emails and on Web pages  ;-)
>>> so I will still see the values in the cells when the text is set to 
>>> white.
>>
>> Set the text color to light magnolia.
>
> There's no need as being able to see the white text against a light 
> magnolia background is not an issue (anyway, other people using the 
> worksheet do run a white background).
>
> My question was whether setting the text colour to white would stop the 
> text printing.  Magnolia text would print, and defeat the purpose of the 
> exercise (see original post).
> -- 
> Mike
> -Please remove 'safetycatch' from email address before firing off your 
> reply-
> 


0
ic2 (12)
2/29/2008 9:09:45 AM
Ian wrote:
>
> You may find, depending on the printer settings, that the white
> text will still print out as black. I came across this issue a long
> time ago and ISTR that if the printer driver was set to print
> black/white (rather than colour), then the white text still printed.
>
> An alternative might be to have other cells outside the print area
> holding the data, then a formula in the printable cell that inserts
> the data if the tickbox is checked. Something like
> =if(tickboxcell="a",datacell,"")
>
> Ian

Thanks Ian, good idea.
-- 
Mike
-Please remove 'safetycatch' from email address before firing off your 
reply-


0
3/3/2008 12:37:44 PM
Reply:

Similar Artilces:

double clicking and draging a column in a chart to chg data
in Excel 2003, double clicking on a column in a chart and then dragging the column up or down would change the data in a table upon which the chart depended. How does one do this in excel 2007? Tom Hi, That feature has been removed in 2007, there is no way to do it. If this helps, click the Yes button. -- Thanks, Shane Devenshire "Tom of inns" wrote: > in Excel 2003, double clicking on a column in a chart and then dragging the > column up or down would change the data in a table upon which the chart > depended. > > How does one do this in excel 2007? &g...

Can you insert a picture into a specific cell?
Or do they only "float" on the page. Marc They float over the worksheet, but you can adjust the size so that it seems to fit a cell exactly. If you insert a picture, you can hold the alt-key down while you move/resize the picture. When it gets close to the edge of a cell, it'll snap-to that edge. Marc wrote: > > Or do they only "float" on the page. > > Marc -- Dave Peterson ...

transfer data from multiple columns to singlr column
I have data in form a d g b e h c f i (but larger scale) and I need it in a single column going a to z. Hi, highlight you data, copy, go to the column where you want to see the data, paste special, transpose "lc85" wrote: > I have data in form a d g > b e h > c f i (but larger scale) > and I need it in a single column going a to z. You up for using a macro? Sub ToOneColumn() 'dantuck Mar 7, 2007 &...

update column
How would I update a column with numeric values so that there are 3 leading zeros for each row? hi it is not possible to add leading zeros to a numeric value. Mathematically, this is redundent and unnecessary. "brian" wrote: > How would I update a column with numeric values so that there are 3 leading > zeros for each row? opps. hit the post button too quick. option 1. custom format if your numeric value is 12345 then see the custom format to 00000000. note. format do not change data - it just changes the way it looks in the cell. option2. format to text then use the c...

Printing double sided brochures in publisher
I am trying to print a tri-fold double sided brochure in Publisher - my problem is that the 2nd page prints upside down - how do you get both sides of the brochure to be printed the same direction? REDLED wrote: > I am trying to print a tri-fold double sided brochure in Publisher - my > problem is that the 2nd page prints upside down - how do you get both sides > of the brochure to be printed the same direction? If you're manually duplexing: Rotate the second page through 180° before reinserting it into the printer. If you're auto-duplexing: Change the options on ...

incorrect check / cheque number printing
When generating a cheque run, let’s say cheque 61, 62, 63 and 64, the information printed on cheque # 62 is actually cheque # 64 and vice versa. This does not happen every cheque run, but it does happen fairly often. I have not seen GP do this. What version and service pack of GP are you using? Are you 100% sure the check stock itself is not out of sequence? Do you have any customizations? -- Victoria Yudin Dynamics GP MVP Flexible Solutions, Inc. "Syed" <Syed@discussions.microsoft.com> wrote in message news:3B02ECEF-7436-4CF3-930E-AA4D2DFDF117@microsoft.com... ...

visual basic
Hi, I trying to retrieve values from a table to calculate the 14days average value of a stock closing price. However, i encounter some problem as stated beside the code as follows: Function DaysAvgs() 'Calculate the average value of a given value. Dim db As DAO.Database Dim rst As DAO.Recordset Dim varBookmark As Variant Dim numAve, numDaysAvg As Double Dim intA, intB, lngCount As Integer Set db = CurrentDb 'Open Table Set rst = db.OpenRecordset("SGX Individual Historical", dbOpenTable) rst.MoveFirst Do While Not rst.EOF intA = 1 intB = 0 varBookmark = rst.Bookmark n...

printing 2 charts on single page
Using Excel 2k, Win 2k I was trying to print to line charts on a single page to demonstrate the corelation between the two data sets. I would like to print in portait mode with one chart on top of page and one on bottom. Excel only seems to offer putting chart 2 on a separate page or embedding it in chart one. I am not very familiar with excel charting capabilites can anyone suggest a resorce? Thanks ...

Joining text with a formula in cell #4
just to complete the thread... I found the answer. You have to change the format of the cell to custom 0.00"*" this is the only way it will show only 2 decimal places Thanks for the hel -- Mustard Hea ----------------------------------------------------------------------- Mustard Head's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=1630 View this thread: http://www.excelforum.com/showthread.php?threadid=27700 ...

Global Column Row Preview Font Size
I know I can change the column, row and preview font size for the current email folder's view, but how do I do it for all of the email folders? I have loads of email addresses each with lots of folders. I don't want to have to do each one at a time. Surely there must be a default font setting (even if it's only in the registry)? Thanks in advance, Tim. I too would love an answer to this. Ian "Timie Milie" <tim_milstead@yahoo.co.uk> wrote in message news:45782ee8$0$27107$db0fefd9@news.zen.co.uk... >I know I can change the column, row and preview font ...

IsOutLookClient() returns wrong value
IsOutLookClient() returns wrong value when both web client of crm and outlook client are running on the same workstation It looks like the same cookie(used for determining what client is running) is used by the sessions of each client. Look for "LightClient" in IsOutlookWorkstationClient() in global.js Oeps...I seem to have made a wrong assumption... Between the to clients IsOutlookClient() seems to work ok... But in outlook client the IsOutlookClient() function gives false for me...after I have opened a page from the Microsoft Crm folder structure... On another workstation it...

changing values of one field based on another
How can I best change the values of one field in a table based on values of another field of the same table. We have an existing table of thousands of entries and I would like to use the following logic to populate a new boolean field. If field1 = "Done" Then BooleanFieldCompleted = True I have some Excel VBA experience but limited Access. I dont want to do this manually! Any assistance appreciated. In general, you'd use an Update query. However, in this case I don't see why you'd need such a field. Why not just create a query with a computed field that returns True...

Single click selects multiple cells
When clicking on a single cell multiple cells are selected. The one time solution for this is to zoom in or out. This is problematic as 60% seems to be the zoom that works most of the time but at this zoom level the cell contents do not display. The time lost and the frustration that builds is killing my productivity and office attitude. Please give all of us a permanet fix. -- Thanks Mike ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" butt...

Comments to print on invoices and packing lists
We have a client with a specific need for printing customer comments and item comments: 1) They want to store comments on Customer Master. When a sales order is entered these comments should default on the sales order with an option to change. They want to mark these comments to be printed on sales order, invoice, packing list and pick ticket. 2) Items are stored with item specific comments. These comments need to come to the sales order when the order is entered with an option to change. They want to setup comments with similar setup where they print on order, invoice, pick ticket and packi...

Referencing cells across sheets
Hi, I've created a workbook with three sheets. The first three columns of sheet 2 and sheet 3 are referenced to the first three columns of sheet 1. What I'd like to do, is set the workbook up so that if I insert a row before, between or after referenced rows in sheet one, a row will also be inserted, and referenced, in the corresponding place on sheets 2 and 3. Does anyone know how to do this? Also, if no data is entered into a cell on sheet one, the value shown in the corresponding cells of sheets '2' and '3' is '0'. I need those cells to remain bla...

Copying Data in a cell in one sheet to a cell in another sheet
I've run into a problem trying to copy data from a cell in one sheet to another. I have a spreadsheet called "rating" which contains a number of formula that calculates a final number. I also have a spreadsheet called "Final" that copies over the information from "Rating". In "Final", I'm trying to copy a number from "Rating" into a particular cell. I put in =Rating! G89, but it won't work. When I press enter, a window pops up "Update value:Rating". I press enter again and in the cell where I want the number ...

How to unlock locked cells by MACRO?!
I have locked Sheet and I need to change particular cells. But when my macro wants to change it => ERROR :/ Is there any way to unprotect these particulary cells by macro and change them? - after that action, of course, I want to lock them again. Please help me, Pedro Just unprotect the sheet, do the work, and reprotect the sheet. Kind of like: activesheet.unprotect password:="yourpassword" 'your code to change stuff activesheet.protect password:="yourpassword" Petr N�me�ek wrote: > > I have locked Sheet and I need to change particular cells. But when m...

printing multiple copies of Sigel GmbH
I have made a tent card in a small size of 5.588cm x 4.191cm for a swing tag, using Sigel GmbH in the "other labels" section. It prints one copy perfectly, leaving room on the page for at least about another 5 copies (which is what I want), but when in the print page section it doesn't give me the option to print multiple copies on the page. This will be an enormous waste of paper if I have to print the number of copies individually on each page. HELP! -- candere What is the product number for this label? I cannot find this size label on my 2007 version. -- Mary Sau...

printing imported gif files in Excel
When printing gif file with transparent background on the grey(25%) background of Excel non-transparent part of the picture has white border around it. Is there any way to prevent it? Thank you in advance... Tim ...

How to add a button to restore all altered cells original values?
I want to add a reset button to an excel spreadsheet that will restore the values of all changed cells to the original saved ones. Any help would be appreciated. Thanks Dawn Hi this would require quite some VBA code as you somehow have to store the original values for example on a separate hidden sheet -- Regards Frank Kabel Frankfurt, Germany "Dawnybros" <Dawnybros@discussions.microsoft.com> schrieb im Newsbeitrag news:3340601E-16EE-4296-8F50-B0BAC18EA387@microsoft.com... > I want to add a reset button to an excel spreadsheet that will restore the > values of all ...

How do I insert space between 2 consecutive columns of an XL Shee.
I want to have space between two consecutive columns of a worksheet (of course, without having inserted another column between the two) in order to have separated the Border Lines of the adjacent cells/columns. Please guide me if it can be done in XL. Can you achieve the effect that you're looking for by using a double vertical border down the right side of the left column and having no border down the left side of the right column? Rgds, ScottO "Shamshad Butt" <Shamshad Butt@discussions.microsoft.com> wrote in message news:1222EE13-11A9-4354-9F12-D1F1155D3902@microsof...

Can i use conditional formating on a cell when it contains a formula?
I am trying a "conditional formatting" on a cell that contains formula, but it didn't work. "If cell value is equal to 0 then font - white" This doesn't work, stays always. If i use this condition on a cell without formula it works just fine. Thank -- si ----------------------------------------------------------------------- sit's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=262 View this thread: http://www.excelforum.com/showthread.php?threadid=26784 Hi are you sure your formula returns an exact zero?. Could you post the formul...

How do I convert a concatenated value into a know value
Hi all I am trying to get the results of a multiple input table, which get concatenated, read out as usable values eg. If the concatenated values are for example *llbbt* , I need this t be read as Simon, or *lbttd* must result in Fred etc... I will attact the spreadsheet. Thanks Colli Attachment filename: book3.xls Download attachment: http://www.excelforum.com/attachment.php?postid=54116 -- Message posted from http://www.ExcelForum.com You are probably better off by describing your problem, most regulars won't open files.. -- Regards, Peo Sjoblo...

Value is BLANK
In a form i'm working on i've asked this question before and i'm unable to locate the replies, but in one cell I have a date to be enter and in the other cell it takes that date and add 5 days to the date to give me a due date. But if no date is enter then I want to to remain blank insted giving me a date. Say that the date is to be entered into A1, then enter this formula into the "other" cell: =IF(A1,A1+5,"") -- HTH, RD ============================================== Please keep all correspondence within the Group, so all may benefit! ==================...

Cell with large amount of data not showing all data
I'm running Excel 97. I have a cell with 358 words (1928 characters with spaces). Word wrap is on for the cell. Only part of the text is displayed even though the cell is big enough to show everything. If I make the cell wider (wider than a page) more of the text shows but not everything. I tried a new worksheet with the same text and had the same problem. Is this a known issue with excel? Is there a solution? Thanks, Brad Left to its own devices, excel will only show about 1000 characters in a cell. But you can add some alt-enters (to force a new line within the cell) and see more s...