I am looking for information on inserting an underline. I do not want the
underline under just the number and I don't want the border option. I belive
there is a format option that will make a line that goes across the cell but
just short of the end of the cell edges. I would appreciate any ideas. I
have seen it before but cannot remember that options to format the line this

Free Excel Help Forum

- Ask any question about Excel and have it answered in no time.

Similar Excel Tutorials

How to Find and Understand Excel Functions
In this tutorial I am going to show you how to find and understand new Excel Functions. If you go to the Formulas t ...
Add Formatting to Comments in Excel
How to format the appearance of a comment and the text within it. Sections: Format Text within a Comment Format th ...
How to Find and Fix Errors in Complex Formulas in Excel
Here, I'll show you a quick, simple, and effective way to fix formulas and functions in Excel. It can be hard to f ...
How to Add Formatting to Cells and Data in Excel Styles, Fonts, Colors, & More
In this tutorial I will cover how to use the various formatting tools in Excel. The Formatting tools are located on ...

Helpful Excel Macros

Format Cells in The Short Date Number Format in Excel
- This free Excel macro applies the Short Date number format to a selection of cells in Excel. This number format display
Format Cells in The Number (Numerical) Number Format in Excel
- This free Excel macro formats selected cells in the Number or Numerical number format in Excel. This means that the cel
Format Cells as Time in Excel
- This free Excel macro formats a selection of cells in the Time format in Excel. This Time number format means that inst
Format Cells as a Scientific Number in Excel Number Formatting
- This free Excel macro formats selected cells in the Scientific number format in Excel. This means the cell will be put
Format Cells as a Fraction in Excel Number Formatting
- This free Excel macro will automatically format a selected cell or many selected cells in the Fraction number format in

Similar Topics

How do I format a cell underline to extend almost the entire width of a cell but not all the way to the edge? (i.e. I'd like an underline longer than simply ctrl + U, but less than entire border underline). Thanks!

Is it possible to underline text with differenet color?

Text is let say std. black, and need red underline.

(I can change color of cell down but I would like underline line in right test test.


I am trying to add a double underline into a specific row (Cell "A" & row). The row can change so I cannot code the position. Initially I had the text coded with a double underline, but my user wants some space between the text and the underline, which led me to try using the shape object. How would I change the following code:


With Sheets(shtRpt).Shapes.AddLine(0, 100, 132, 100).Line
                .Style = msoLineThinThin
                .Weight = 3#
            End With


I have a value (numeric) in cell A1.

Then in cell B1, I have the follwoing formula:

="The result is"&A1.

So if I have a number 50 in A1, B1 will look like:

The result is 50.

How do I make that

The result is 50.


I reckon I need to use the TEXT(REF,FORMAT) function but I do not know how to express the UNDERLINE format in the custom formatting.


My spreadsheet contains an unusual underline that I cannot remove.
Neither the Borders or the Underline commands remove it.
It is not the dotted line subscribing a page to be printed.
I'm stumped.

Hi all

For some reason (and I have searched and searched) I can't find an option in Excel 2003 to underline misspelt words with a red line.

Can someone stop me losing my mind and point it out.

I bet after all this its as obvious as hell



I've been doing alot of research for the past week on this topic and came up with top two answers .
1. you cant do it
2. you can do it but only if it is broken up.
3. find another option.

lets say i want to do this.

and have been trying really hard to find en number of ways.

code 1 by pgc01
Private Sub Worksheet_Change(ByVal Target As Range)
Dim s1 As String, s2 As String

' only if D1 changes
If Target.Address "$D$1" Then Exit Sub

' write the text in A1
s1 = " The Agreement between (The ""Company"") and "
s2 = " (The ""Customer"")"
Range("A1") = s1 & Range("D1") & s2

' add underline to the format of the words "Company" and "Customer"
Range("A1").Characters(InStr(1, Range("A1"), "Company", vbTextCompare), Len("Company")).Font.Underline = True
Range("A1").Characters(InStr(1, Range("A1"), "Customer", vbTextCompare), Len("Customer")).Font.Underline = True

End Sub

(i have been hopping)
code 2 from itags.org
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
therse were the best two answers i could find out for underlineing a part of a sentence in a cell.

now my question here is for some one who can put up a function for a sell only or formatting.

for example
A1 = The
B1 = Cow
C1 = jumped
D1 = over
E1 = the
F1 = moon.

lets say my data is like this. if i really want to join the sentense all i have to do is "=A1&B1&C1&D1&E1&F1" (without quots)

can someone come up with a function to underline just 1 cell

hypothetically C1

thus bringing me to a formula
"=A1&B1&underline(C1)&D1&E1&F1" (without quots)

ideally this should be the case isnt it ?

Any suggestions on how to go about this.... i've just theorized the theory.

Some one help me put this in motion.


Cells A1 to A5 have :
1 xyz 2 xyz 3 xyz 4 abc 5 abc 6 def
I would like to underline rows 3, 5 and 6 (that is before the value in A changes to the next value).

Also if possible, to clear the underlines in prior rows - that is if row 2 has an underline that should be cleared and only row 3 to be undelined.

Can anybody help with a simple macro ? Appreciate your time...


I have a series of cells in a column and I would like to programatically add an underline each time there is a break in the cell value. For example,


Any ideas?


I'm not sure if I'm posting this to the correct newsgroup or not, so feel
free to redirect me to the appropriate place if necessary. At any rate, I am
receiving the error, "Unable to set the underline property of the font class"
in an Access module using the Excel code below:

ExcelSheet.Application.Cells(1, 1).Font.Underline = xlUnderlineStyleSingle

The following line of code "does" work, however:

ExcelSheet.Application.Cells(1, 1).Font.Bold = True

Do you see anything wrong with the way I am attempting to set the underline
property? Thanks in advance!

i write some text and give them green color and when i underline them underline color is also green can i change underline color to orange while text remains in green color.


I enter spreadsheet data across extremely long rows. I have frozen
important reference data from column A. The trouble is that when I key
in data on the right side of the screen, it's difficult to distinguish
if i'm on the correct row. The spreadsheet has already used up all the
contitional formatting, so coloring even/odd rows won't help me either.

I would love something that puts a hard underline under the entire row
when any cell of that row is selected, and then removes the line when
the cell is unselected. --like using a ruler to read a hardcopy. I
don't use the hard underline anywhere else in the document, so there is
no need to recall the pre-selected status.

any ideas?

I have read postings that suggested using the "double accounting underline".
how do i create the double accounting underline.


I am using 4 sheets in Excel (meaning the tabs on bottom of screen) and I
need to carry over the words or phrases that are in Bold , Italics or
Underline. How do I carry over to each sheet the text in bold, italics or
underlined words? Because I have to go to each individual sheet and change
the words I need to be in bold italics or underline.

When working on a financial statement, I was curious how to 1. Have a line
extend across an entire cell even if the number is only 2-3 digits and 2. How
to apply a double line under a number without using the = sign in the
following cell?

Running Excel in Office 2003 on Windows XP Home

I have a column with about 20 rows in it. I would like to place a border
(black line) at the bottom of each cell. If I drag my mouse over all 20
cells, they highlight. I then go to format>cells>border and select the
bottom line option. It applies it to only one of the 20 cells even though
all were highlighted. If I click the first cell then Shift-Click the last
cell, they all highlight but again using the format>>>> only one cell gets
the bottom border.

If I click on the first cell, then CTRL-click on each of the other 19 cells
one at a time, they are all highlighted and then the format>>>> process
will provide a bottom border on all cells.

Why do I have to individualy click on every one of the 20 cells to get them
included in the formatting?

I don't want to format the entire column A or any cells to the right of
column A.

What am I missing? I've spent hours and much frustration over something
that's probably straight-forward.



Welcome to the forum!!

Your code has being wrapped for you but could you please read forum rules


ActiveCell.Characters(3,1).Font.Underline = True

--- will underline the third character of the active cell.

If the third character is already underlined, is there a way to go through the characters of the cell and find which ones are underlined? My


  For X = 1 to Len(ActiveCell.Value)
     If ActiveCell.Characters(X,1).Font.Underline = True then....

code does not carry out the "Then" part of the If statement. Is there a different way to find underlined characters?

Thank you, Brad

I am trying to copy a formated paragraph in word, with SHIFT Enter. This
text also has BOLD, and underline text in it.

I want to copy this to a single cell -- retaining the same format (i.e. bold
and underline) as well as change the SHIFT ENTER characters to ALT ENTER.

If I do a Copy from Word, after selecting the paragraph, and paste it into
Excel -- all the SHIFT Enter goes to new lines in Excel.

I have tried to first copy this over to Word, change all the SHIFT Enter's
to ALT Enter, and then paste to Excel -- but I either lose the format, or I
get back the multiple lines.

Reading some posts suggested that I convert all the SHFT enter's to $$$, and
then in Excel Replace the $$$ with ALT ENTER. Problem is, I lose the
formating, or everthing goes to plain text.

Is there a way to copy a paragraph to Excel -- retaining the same format?



Does anyone know if/where I can change the border thickness? I need a double underline border that is 2 1/4 point and haven't had any luck finding it! I know it can be done in Word, but I need to do it in Excel....

Thank you in advance,

aka Bluey

I want to know if excel can underline misspelled words like Word? If not is
there any way to turn off autocorrect and hightlight misspelled words in
excel or word. With auto correct on if I type a word or name that the
application thinks is missed spelled but isn't it changes it. I don't want
the word changed but highlighted or underlined so I can have an idea of
possible misspelled words.

I am trying to change the weight of the border of a column chart in VBA using the following code:


With Worksheets("Overall Chart Time").ChartObjects("ChartTimeQty").Chart.SeriesCollection(SCItem) 
    .Values = ValueStr 
    .Name = NameStr 
    .XValues = xValueStr 
    .ChartType = xlColumnStacked 
    .Format.Line.Weight = 1.75 
    .Border.LineStyle = xlLineStyleEn 
    .Border.Color = RGB(0, 0, 0) 
    .Interior.Color = Colour 
End With 

If you like these VB formatting tags please consider sponsoring me in support of injured Royal Marines

The .Format.Line.Weight seems to ignore the decimal places i.e. .Format.Line.Weight = 1.75 is the same as .Format.Line.Weight = 1

I am using Excel 2007.


Encountered an issue with how Excel 2007 updates/refreshes conditional formatting, description below:

1.) Data validation list set up in a cell with two user options
2.) Conditional format set as follows:

Option 1: Format cell as number
Option 2: Format cell as percent

3.) Once data validation is set and "Apply" button chosen, the cell is correctly formatted. Once option 1 is chosen however, it will not revert back to the % when option 2 is selected.
4.) The only way to get it to update as a % is to select any cell in the workbook, hit F2, and Enter. Or you can go back through the conditional formatting wizard.

Attached a very basic workbook that displays the issue and aligns with example above.

Thanks for any help!

using the "displaying help" tip found at
...has anyone managed to find a way to copy text formatting (bold, underline, strikethrough etc) from the source cell to the textbox on the form? I would really like to be able to do this.

I've used Group Boxes to isolate some Option Buttons. I would like to remove the line border of the Group Box, but I don't see a way to format it. Can this be done?


This is probably one of the more stupid/simple questions to come up on these boards but I just can't figure it out.

I want to use a spreadsheet to track my jogging times, to be exact I want to insert the time for each lap, sum them up and then compare the result against a points system.

The problem is that I just can't quite figure out how to enter times in minutes and seconds into Excel. Say for example I want 2:15 to mean 2 minutes and 15 seconds. I went into Format Cell->Custom and there was a format setting for "mm:ss" which I thought would be just what I was looking for.
However upon formatting a cell into that format and inserting 2:15, it shows me 2:15:00 even though the format setting I have chosen shouldn't leave an option open for hours to be shown. Now I noticed that if I were to type in 0:2:15 then it would show up as 02:15 which is a bit closer to what I want but its still slightly annoying to type that extra superfluous "0:" in front of every time I want to enter.

So in short: what can I do to Excel to make it think that when I'm entering 2:15 into a cell, it stands for 2 minutes and 15 seconds and not something else?