Enter text and formula in a cell

C

Carter68

Is there a way I can enter text and a formula in a cell. For example: I
want to have the word "Total" and the count of the column in a cell.
 
U

ufo_pilot

=IF(1=1,""&(" Total ")&SUM(C1:C4)&"","")

this works, but you can clean it up if you want ( it will sum c1 through c4
right now)
 
N

Niek Otten

If the formula for your total is, for example, =SUM(A1:A20)
Then use
="TOTAL "&SUM(A1:A20)

You may not like the formatting of the total.

Put the simple form of the SUM formula in a cell and format as required. Then, with that cell selected: Format>Cells>Number>Custom
tab, and copy or write down what's in the Type box. Let's say #,##0.00
Now change your formula to
="TOTAL "&TEXT(SUM(A1:A20),"#,##0.00")


--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| Is there a way I can enter text and a formula in a cell. For example: I
| want to have the word "Total" and the count of the column in a cell.
 
D

Dana DeLouis

Just another option. Note the double quote.

=TEXT(SUM(A1:A20),"""Total:"" #,##0.00")
 
R

Roger Govier

An another option

Format>Cells>Number>Custom> "Total: " #,##0.00
In cell just use
=SUM(A1:A20)
 
N

Niek Otten

This is much better; you can still calculate with it

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

| An another option
|
| Format>Cells>Number>Custom> "Total: " #,##0.00
| In cell just use
| =SUM(A1:A20)
|
| --
| Regards
|
| Roger Govier
|
|
| | > Just another option. Note the double quote.
| >
| > =TEXT(SUM(A1:A20),"""Total:"" #,##0.00")
| >
| > --
| > HTH :>)
| > Dana DeLouis
| > Windows XP & Office 2003
| >
| >
| > | >> Is there a way I can enter text and a formula in a cell. For
| >> example: I
| >> want to have the word "Total" and the count of the column in a cell.
| >
| >
|
|
 
A

ArcticWolf

What a great tip Roger, it saves all the complicated formual entries (which
are great) and I can just SUM each cell now which is easier and quicker than
typing the long formula.

Thanks for sharing.

AW
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top