ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Enter text and formula in a cell (https://www.excelbanter.com/excel-worksheet-functions/117404-enter-text-formula-cell.html)

Carter68

Enter text and formula in a cell
 
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.

ufo_pilot

Enter text and formula 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)

"Carter68" wrote:

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.


Niek Otten

Enter text and formula in a cell
 
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: FormatCellsNumberCustom
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

"Carter68" wrote in message ...
| 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.



Carter68

Enter text and formula in a cell
 
Thank you! That is exactly what I was looking for.

"Niek Otten" wrote:

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: FormatCellsNumberCustom
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

"Carter68" wrote in message ...
| 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.




Dana DeLouis

Enter text and formula in a cell
 
Just another option. Note the double quote.

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

--
HTH :)
Dana DeLouis
Windows XP & Office 2003


"Carter68" wrote in message
...
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.




Roger Govier

Enter text and formula in a cell
 
An another option

FormatCellsNumberCustom "Total: " #,##0.00
In cell just use
=SUM(A1:A20)

--
Regards

Roger Govier


"Dana DeLouis" wrote in message
...
Just another option. Note the double quote.

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

--
HTH :)
Dana DeLouis
Windows XP & Office 2003


"Carter68" wrote in message
...
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.






Niek Otten

Enter text and formula in a cell
 
This is much better; you can still calculate with it

--
Kind regards,

Niek Otten
Microsoft MVP - Excel

"Roger Govier" wrote in message ...
| An another option
|
| FormatCellsNumberCustom "Total: " #,##0.00
| In cell just use
| =SUM(A1:A20)
|
| --
| Regards
|
| Roger Govier
|
|
| "Dana DeLouis" wrote in message
| ...
| Just another option. Note the double quote.
|
| =TEXT(SUM(A1:A20),"""Total:"" #,##0.00")
|
| --
| HTH :)
| Dana DeLouis
| Windows XP & Office 2003
|
|
| "Carter68" wrote in message
| ...
| 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.
|
|
|
|



ArcticWolf

Enter text and formula 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

"Roger Govier" wrote:

An another option

FormatCellsNumberCustom "Total: " #,##0.00
In cell just use
=SUM(A1:A20)

--
Regards

Roger Govier


"Dana DeLouis" wrote in message
...
Just another option. Note the double quote.

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

--
HTH :)
Dana DeLouis
Windows XP & Office 2003


"Carter68" wrote in message
...
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.








All times are GMT +1. The time now is 03:17 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com