Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have a cell with some formatting (an underlined digit) on one worksheet and
I would like to display it on another worksheet. Why won't the following code, when invoked in sheet 2 such as "=CopyNumberWithOneUnderlinedCharacter(Sheet1!A2)" , display the cell. The line inside the "If" complains that "A value used in the formula is of the wrong type". I've tried many variations of this but this one I think gets the point across. Function CopyNumberWithOneUnderlinedCharacter(ByVal myCell As Range) Dim l_Position As Integer For l_Position = 1 To Len(myCell.Value) If myCell.Characters(Start:=l_Position, Length:=1).Font.Underline _ < xlUnderlineStyleNone Then CopyNumberWithOneUnderlinedCharacter.Characters(St art:=l_Position, Length:=1).Font.Underline = xlUnderlineStyleSingle End If Next l_Position End Function |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Cell formatting doesn't display | Excel Discussion (Misc queries) | |||
Calculate the difference between two cell entries using NOW() func | Excel Worksheet Functions | |||
Formatting Cell To Display Value Instead Of Formula | Excel Worksheet Functions | |||
Why won't my conditional formatting display in the cell | Excel Discussion (Misc queries) | |||
Help pls! Max func to display value of different cell? | Excel Worksheet Functions |