A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » General Discussion
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Hide certain information within a cell when printing



 
 
Thread Tools Display Modes
  #1  
Old June 12th, 2004, 12:43 PM
jeremy
external usenet poster
 
Posts: n/a
Default Hide certain information within a cell when printing

Is it possible to hide certain digits when printing in excel?, for example the cell will show: A/O(1) but when viewing the printed version I would like the cell to show A/O
  #2  
Old June 12th, 2004, 01:29 PM
Frank Kabel
external usenet poster
 
Posts: n/a
Default Hide certain information within a cell when printing

Hi
AFAIK this is not possible. You could create a macro which would do the
following:
- use a helper column which shows only the relevant part of your data
- hides the original column
- prints the sheet
- unhides the original column
- deletes the helper column

--
Regards
Frank Kabel
Frankfurt, Germany


jeremy wrote:
Is it possible to hide certain digits when printing in excel?, for
example the cell will show: A/O(1) but when viewing the printed
version I would like the cell to show A/O


  #3  
Old June 12th, 2004, 03:52 PM
JE McGimpsey
external usenet poster
 
Posts: n/a
Default Hide certain information within a cell when printing

One way:

Assuming 1) you want to hide everything after the first "(", 2) the cell
background colors are automatic (or white), and 3) the fonts are the
default color:


Public Sub HideAndPrint()
Dim rCell As Range
Dim rConvert As Range
Dim rPR As Range
Dim nPos As Long

On Error Resume Next
Set rPR = Range("Print_Area")
If rPR Is Nothing Then Set rPR = ActiveSheet.UsedRange
On Error GoTo 0
For Each rCell In rPR
With rCell
nPos = InStr(.Text, "(")
If nPos 0 Then
If rConvert Is Nothing Then
Set rConvert = .Cells
Else
Set rConvert = Union(rConvert, .Cells)
End If
.Characters(nPos).Font.ColorIndex = 2
End If
End With
Next rCell
ActiveSheet.PrintOut
For Each rCell In rConvert
With rCell
.Characters(InStr(.Text, "(")).Font.ColorIndex = xlAutomatic
End With
Next rCell
End Sub


In article ,
jeremy wrote:

Is it possible to hide certain digits when printing in excel?, for example
the cell will show: A/O(1) but when viewing the printed version I would like
the cell to show A/O

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:14 PM.


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