Everyone knows that you can underline text by simply selecting what you want underlined and then clicking on the Underline tool on the ribbon or toolbar. This adds a single underline. If you want a double underline, you must display the Home tab of the ribbon and use the down-arrow at the right of the Underline tool.
If you want any fancier underlines, it really helps to display the Font tab of the Format Cells dialog box. You do this by displaying the Home tab of the ribbon and clicking the small icon at the bottom-right of the Font group.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (6610) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Underlining Text in Cells.
Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!
Excel provides a variety of underlining styles you can use when you need to underline information within a cell. Here's ...
Discover MoreWhen you create workbooks for others to use, you might want to make sure that they can't change the formatting and paper ...
Discover MoreWant to format your data tables in a hurry? It's easy to do if you use the built-in table formatter provided in Excel.
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2021-04-28 05:13:13
Willy Vanhaelen
@Peter Atherton
This macro can be a lot shorter:
Sub UnderlineDate()
[a1] = "For the month ending " & DateSerial(Year([f1]), Month([f1]) + 1, 0)
[a1].Characters(22, 10).Font.Underline = True
End Sub
2019-08-19 10:00:43
Peter Atherton
Hector
If you do not mind a macro, this will enter the text in A1 and underline it. It uses the EOMONTH function to calculate the date of today's date but yo can reset it to F79
Sub UnderlineDate()
Dim txt As String
Dim dte As Date
txt = "For the month ending "
dte = [f1]
dte = Application.EoMonth(dte, 0)
[a2] = txt & dte
Dim L As Integer
L = Len([a1])
[a1].Characters(22, 10).Font.Underline = True
End Sub
2019-08-17 05:28:58
Steve Jez
Hector,
If the heading is on the worksheet & not a printing header, is it possible to split your header over 2 cells. "For the month ending: " in one cell right aligned and then your date formula in the adjacent cell to the right & left align it & underline ?
2019-08-16 15:25:39
hector
hey!
I need to present this heading " For the Month ending: 8/31/2019". This will be a calculated date. I NEED to underscore JUST the calculated date.
I already have the calculated date in cells F79 & G78 respectively and have this function there: ="For the month ending: " & F79 & " of " & G78
MY QUESTION IS: HOW CAN I MANAGE TO HAVE JUST THE DATE UNDERSCORED????
or how can i recall the CTRL-U within my formula??)
2017-10-24 09:17:22
Rusty Chiles
Note, a much quicker shortcut to opening the Format Cells box is to push 'Ctrl+1'
2017-10-23 09:34:49
Bryan Marks
You may want to add that you can also underline just part of the text--for example, a single word--in a cell. This is also true if you want to bold, italicize, and/or change the color of specific text in a cell.
For a cell that already has text in it, this can be accomplished by hitting F2 or double-clicking on the cell to edit it. Select the word or words you wish to modify, then either select the appropriate function from the toolbar (e.g., underline, bold, italics, color) or the short cuts such as Ctrl+U, Ctrl+B, or Ctrl+I to modify the text, then exit the cell.
If the cell is blank, simply start typing and use the above options to modify the text as desired, then exit the cell.
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2022 Sharon Parq Associates, Inc.
Comments