Combining Percent with Text

R

Rodman

Hello,

I am attempting to show the percentage complete (in a cell) using the
COUNTIF function.

I first formatted a cell (example A1) as a percent the I enter the following
formula in cell A1: =countif(b1:b12,"Completed")/countif(b1:b12,"*")

It returns the correct value in cell A1, however, I would like to add the
word "Completed" after the percent value.

Can Anyone Assist Me?

Thanks In Advance.
 
L

LarryP

Not a big Excel guru, but I should think if your formula is returning the
numeric value you want, tacking & "% Completed" at the end should
do it.
 
F

Fred Smith

First, your formula can be simplified as follows:
=countif(b1:b12,"Completed")/counta(b1:b12)

Second to add "Completed", you do it with concatenation, as in:
=countif(b1:b12,"Completed")/counta(b1:b12)&" Completed"

However, Excel when you use concatenation, Excel formats numbers as General,
which isn't normally what is wanted.

To format your result, use the Text function as in:
=text(countif(b1:b12,"Completed")/counta(b1:b12),"0.00%")&" Completed"

Remember that you've now changed the data to text, and it can't be used in
calculations anymore.

Regards,
Fred
 
G

Gary''s Student

=TEXT(COUNTIF(B1:B12,"Completed")/COUNTIF(B1:B12,"*"),"0.00%") & " Completed"
 
D

Daryl S

Rodman -

=TEXT(COUNTIF(B1:B12,"Completed")/COUNTIF(B1:B12,"*"),"0%") & " Completed"
 
J

Jim Thomlinson

I would be inclined to just use a custom format as opposed to changing the
value to text. If you use the
& "% Completed"
method you can not use the number for calculations...

Format | Cells | Custom -> 0.00% "Completed"

This leaves your calculated number in tact and only changes the display of
the number.
 

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