Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Text and Formula in the Same Cell

Hi all!

Is it possible to place text and a formula in the same cell? I have a column
of people's names. But I would like to add a count of occurences of that name
in the column. I have successfully been able to do the count in another cell
but I want the name and the figure in the same cell.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Text and Formula in the Same Cell

="ABCD " & countif(A1:A10,"ABCD")

--
Regards,
Tom Ogilvy

"LDanix" wrote in message
...
Hi all!

Is it possible to place text and a formula in the same cell? I have a

column
of people's names. But I would like to add a count of occurences of that

name
in the column. I have successfully been able to do the count in another

cell
but I want the name and the figure in the same cell.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Text and Formula in the Same Cell

I can come up with a couple of formulas to get the name plus its count in
column A. Assuming D1 has the formula to get the count, and you put this
formula is in column A,

="Myrna Larson"&" "&TEXT(D1,"##0")

The formula for D1 is: =COUNTIF($A:$A,"Myrna Larson"&"*")

You can combine the two formulas to get, in column A,

="Myrna Larson"&" "&TEXT(COUNTIF($A:$A,"Myrna Larson"&"*"))

Problem is, both of those create a circular reference. I suppose you could
turn iterations on, but I sure wouldn't do that. Then you get no warning when
you create an unintentional circular reference.

Put the count in a separate column.


On Thu, 28 Oct 2004 17:55:03 -0700, LDanix
wrote:

Hi all!

Is it possible to place text and a formula in the same cell? I have a column
of people's names. But I would like to add a count of occurences of that name
in the column. I have successfully been able to do the count in another cell
but I want the name and the figure in the same cell.


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Text and Formula in the Same Cell

But that formula can't go in A1:A10, right? I thought that's what he meant by
"in the column", but maybe I'm over-interpreting....

On Thu, 28 Oct 2004 21:29:25 -0400, "Tom Ogilvy" wrote:

="ABCD " & countif(A1:A10,"ABCD")


  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 19
Default Text and Formula in the Same Cell

If I did turn on iterations, would it affect all workbooks or just the one
that I turn it on for? And how would I turn it on?

I only need to create this one formula, so I'm not too worried about more
circular references in it, but if the change will affect other workbooks,
then, you're right; I had better not.

"Myrna Larson" wrote:

I can come up with a couple of formulas to get the name plus its count in
column A. Assuming D1 has the formula to get the count, and you put this
formula is in column A,

="Myrna Larson"&" "&TEXT(D1,"##0")

The formula for D1 is: =COUNTIF($A:$A,"Myrna Larson"&"*")

You can combine the two formulas to get, in column A,

="Myrna Larson"&" "&TEXT(COUNTIF($A:$A,"Myrna Larson"&"*"))

Problem is, both of those create a circular reference. I suppose you could
turn iterations on, but I sure wouldn't do that. Then you get no warning when
you create an unintentional circular reference.

Put the count in a separate column.


On Thu, 28 Oct 2004 17:55:03 -0700, LDanix
wrote:

Hi all!

Is it possible to place text and a formula in the same cell? I have a column
of people's names. But I would like to add a count of occurences of that name
in the column. I have successfully been able to do the count in another cell
but I want the name and the figure in the same cell.





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 863
Default Text and Formula in the Same Cell

There's an error in my 2nd attempt. Should be

="Myrna Larson"&" "&TEXT(COUNTIF($A:$A,"Myrna Larson"&"*"),"0")

I don't remember off-hand whether it affects all open workbooks or not. Try it
and find out. You turn it on under Tools/Options/Calculation. Set the number
of iterations to 1.

Why do you want to do this? Is it for cosmetic reasons for a print-out? If so,
if the full list of names is in column A, you have a list of the unique names
in column B, in C the formula =COUNTIF($A:$A,B1) and in column D the formula
=B1&TEXT(C1,"0"). Set the print area to exclude columna A:C, or hide those
columns before printing.



On Thu, 28 Oct 2004 18:57:01 -0700, LDanix
wrote:

If I did turn on iterations, would it affect all workbooks or just the one
that I turn it on for? And how would I turn it on?

I only need to create this one formula, so I'm not too worried about more
circular references in it, but if the change will affect other workbooks,
then, you're right; I had better not.

"Myrna Larson" wrote:

I can come up with a couple of formulas to get the name plus its count in
column A. Assuming D1 has the formula to get the count, and you put this
formula is in column A,

="Myrna Larson"&" "&TEXT(D1,"##0")

The formula for D1 is: =COUNTIF($A:$A,"Myrna Larson"&"*")

You can combine the two formulas to get, in column A,

="Myrna Larson"&" "&TEXT(COUNTIF($A:$A,"Myrna Larson"&"*"))

Problem is, both of those create a circular reference. I suppose you could
turn iterations on, but I sure wouldn't do that. Then you get no warning

when
you create an unintentional circular reference.

Put the count in a separate column.


On Thu, 28 Oct 2004 17:55:03 -0700, LDanix


wrote:

Hi all!

Is it possible to place text and a formula in the same cell? I have a

column
of people's names. But I would like to add a count of occurences of that

name
in the column. I have successfully been able to do the count in another

cell
but I want the name and the figure in the same cell.




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Text and Formula in the Same Cell

If you want it to count itself, then you would need to click on iteration in
calculate tab of Tools=options to allow circular references. The formula
would then be

="ABCD " & countif(A1:A10,"ABCD*")

in that case.

Iteration is an application level setting. If it is on, it is on for all
workbooks.

--
Regards,
Tom Ogilvy




"Myrna Larson" wrote in message
...
But that formula can't go in A1:A10, right? I thought that's what he meant

by
"in the column", but maybe I'm over-interpreting....

On Thu, 28 Oct 2004 21:29:25 -0400, "Tom Ogilvy" wrote:

="ABCD " & countif(A1:A10,"ABCD")




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
bold text of referenced cell show in formula cell zabcikranch Excel Worksheet Functions 1 February 2nd 10 07:42 PM
The result of a formula referring to a cell with formula as text? JCC Excel Worksheet Functions 10 September 3rd 09 03:15 PM
Concatenate text cell and formula cell result GoinCrazy Excel Worksheet Functions 4 November 26th 08 04:27 PM
Excel Formula if cell is empty then no if text in cell then yes Kathy Excel Worksheet Functions 2 December 20th 06 05:24 PM
match cell text with text in formula Todd L. Excel Worksheet Functions 3 December 9th 04 08:11 PM


All times are GMT +1. The time now is 03:10 AM.

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"