Home |
Search |
Today's Posts |
#1
![]() |
|||
|
|||
![]()
I would like to add a suffix <<< "hrs" to some fields. The fields are the
result of Formulas <<< "=SUM(C11:C42)" I would like the field to be displayed as the resultant number (49) & the desired text (hrs) = 49 hrs. Is there a means to do this? |
#2
![]() |
|||
|
|||
![]()
Try...
=SUM(C11:C42)&" hrs" Hope this helps! In article , "Dr. Darrell" wrote: I would like to add a suffix <<< "hrs" to some fields. The fields are the result of Formulas <<< "=SUM(C11:C42)" I would like the field to be displayed as the resultant number (49) & the desired text (hrs) = 49 hrs. Is there a means to do this? |
#3
![]() |
|||
|
|||
![]()
Dr.,
Probably the best way to add your suffix is with the number formatting of the cell. With the cells selected, Format - Cells - Number - Custom. append the following to whatever is in the box: " hrs" If there are semicolons in the current formatting stuff, put the above in front of each semicolon, as well as at the end. If this doesn't work, post back with the current formatting code, and we'll go from there. With this method, your total remains a number, which can be used by other formulas if needed. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Dr. Darrell" wrote in message ... I would like to add a suffix <<< "hrs" to some fields. The fields are the result of Formulas <<< "=SUM(C11:C42)" I would like the field to be displayed as the resultant number (49) & the desired text (hrs) = 49 hrs. Is there a means to do this? |
#4
![]() |
|||
|
|||
![]()
try this
Sub addsuffix() For Each c In Selection 'to leave formula and add suffix If Left(c.Formula, 1) = "=" Then c.Formula = c.Formula & "&" & """ hrs""" 'or this line to leave the value only 'If Left(c.Formula, 1) = "=" Then c.Value = c & " hrs" Next End Sub -- Don Guillett SalesAid Software "Dr. Darrell" wrote in message ... I would like to add a suffix <<< "hrs" to some fields. The fields are the result of Formulas <<< "=SUM(C11:C42)" I would like the field to be displayed as the resultant number (49) & the desired text (hrs) = 49 hrs. Is there a means to do this? |
#5
![]() |
|||
|
|||
![]()
Earl:
Thank you, that was very simple and very helpful. Darrell "Earl Kiosterud" wrote: Dr., Probably the best way to add your suffix is with the number formatting of the cell. With the cells selected, Format - Cells - Number - Custom. append the following to whatever is in the box: " hrs" If there are semicolons in the current formatting stuff, put the above in front of each semicolon, as well as at the end. If this doesn't work, post back with the current formatting code, and we'll go from there. With this method, your total remains a number, which can be used by other formulas if needed. -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Dr. Darrell" wrote in message ... I would like to add a suffix <<< "hrs" to some fields. The fields are the result of Formulas <<< "=SUM(C11:C42)" I would like the field to be displayed as the resultant number (49) & the desired text (hrs) = 49 hrs. Is there a means to do this? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Date Formats Available | Excel Discussion (Misc queries) | |||
Sorting when some numbers have a text suffix | Excel Discussion (Misc queries) | |||
How do I | Excel Discussion (Misc queries) |