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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|