Enter text and formula in a cell

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
=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)
 
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.
 
Just another option. Note the double quote.

=TEXT(SUM(A1:A20),"""Total:"" #,##0.00")
 
An another option

Format>Cells>Number>Custom> "Total: " #,##0.00
In cell just use
=SUM(A1:A20)
 
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.
| >
| >
|
|
 
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
 
Back
Top