Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Dr. Darrell
 
Posts: n/a
Default I'd like to add a suffix...

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   Report Post  
Domenic
 
Posts: n/a
Default

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   Report Post  
Earl Kiosterud
 
Posts: n/a
Default

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   Report Post  
Don Guillett
 
Posts: n/a
Default

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   Report Post  
Dr. Darrell
 
Posts: n/a
Default

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date Formats Available RTANSW via OfficeKB.com Excel Discussion (Misc queries) 3 June 1st 05 04:15 AM
Sorting when some numbers have a text suffix confused on the tundra Excel Discussion (Misc queries) 5 December 18th 04 10:19 PM
How do I Dark Horse Excel Discussion (Misc queries) 13 December 6th 04 11:29 PM


All times are GMT +1. The time now is 11:51 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"