Text And Formula

dantb

Active Member
Joined
Mar 20, 2002
Messages
358
Is it possable to have text included with a formula? I was wondering if I could have the word "Total" inserted somehow in the below formula. Thanks Dan

=SUM(E1+G1)
 

Some videos you may like

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Derek

Well-known Member
Joined
Feb 16, 2002
Messages
1,592
Hi there

Yes, you can do it like this:

="Total "&SUM(E1+G1)

(use "+" when adding numbers but use "&" when adding text)

regards
Derek
 

dantb

Active Member
Joined
Mar 20, 2002
Messages
358
Thanks Derek: Works great, learn something new everyday. Thanks again Dan !
 

PA HS Teacher

Well-known Member
Joined
Jul 17, 2004
Messages
2,838
Alternatively you could use a custom number format such as:

"Total" #.0

This would have the advantage of keeping your sum formatted as a number.
 

Atom

New Member
Joined
Nov 11, 2005
Messages
30

ADVERTISEMENT

PA HS T,

That is a great alternative I wouldn't have thought of!
 

PaddyD

MrExcel MVP
Joined
May 1, 2002
Messages
14,234

ADVERTISEMENT

="Total "&SUM(E1+G1)

...& just to be pedantic, there's no need to do the explicit addition inside the sum():

="Total "&SUM(E1,G1)

or

="Total "&(E1+G1)

...would do.
 

Norie

Well-known Member
Joined
Apr 28, 2004
Messages
76,089
Office Version
  1. 365
Platform
  1. Windows
And to be even more pedantic you don't need the ().:)

="Total "& E1+G1
 

Watch MrExcel Video

Forum statistics

Threads
1,119,144
Messages
5,576,326
Members
412,716
Latest member
thviid
Top