Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 6
Default need formula for % of times text appears in row.

Hi. I need help with with calculating the percentage of times
a specific text appears within a row.
The formula needs to be relative, so I can copy and paste it
into successive rows.

e.g. Based on the text in A2:D2, what are the percentages
for x, y, z in that range?

____________________________________

__ |_A_|_B_|_C_|_D_| _E_ |__F_ |_ G_ |__
1 | | | | | %x | %y | %z |

2 | z | y | z | x | 25 | 25 | 50 |

_____________________________________


(Thus, row 2 is comprised of 25% X, 25% Y, 50% Z.
Can someone help me with this?)

Thank you,
Bob


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 4,339
Default need formula for % of times text appears in row.

Based on your example:

in E2:

=COUNTIF($A2:$D2,E1)/COUNTA($A2:$D2) where E1="x"

Copy across to cells F2 & G2 and copy down as required

Cells are formatted as %.

HTH

"sunslight" wrote:

Hi. I need help with with calculating the percentage of times
a specific text appears within a row.
The formula needs to be relative, so I can copy and paste it
into successive rows.

e.g. Based on the text in A2:D2, what are the percentages
for x, y, z in that range?

____________________________________

__ |_A_|_B_|_C_|_D_| _E_ |__F_ |_ G_ |__
1 | | | | | %x | %y | %z |

2 | z | y | z | x | 25 | 25 | 50 |

_____________________________________


(Thus, row 2 is comprised of 25% X, 25% Y, 50% Z.
Can someone help me with this?)

Thank you,
Bob


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,047
Default need formula for % of times text appears in row.

Hi

=contif($a2:$d2,right(e1,1))/counta($a2:$d2)

copy it right and down as you need

hth
--
regards from Brazil
Thanks in advance for your feedback.
Marcelo



"sunslight" escreveu:

Hi. I need help with with calculating the percentage of times
a specific text appears within a row.
The formula needs to be relative, so I can copy and paste it
into successive rows.

e.g. Based on the text in A2:D2, what are the percentages
for x, y, z in that range?

____________________________________

__ |_A_|_B_|_C_|_D_| _E_ |__F_ |_ G_ |__
1 | | | | | %x | %y | %z |

2 | z | y | z | x | 25 | 25 | 50 |

_____________________________________


(Thus, row 2 is comprised of 25% X, 25% Y, 50% Z.
Can someone help me with this?)

Thank you,
Bob


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
Searching for text & counting how many times it appears smck Excel Worksheet Functions 5 September 15th 06 12:28 PM
formula bar shows a ' before text Rose Excel Discussion (Misc queries) 4 March 2nd 06 03:26 PM
Invisable text in formula bar Leroy-P Excel Discussion (Misc queries) 2 December 8th 05 02:40 PM
Formula checking multiple worksheets sonic-the-mouse Excel Worksheet Functions 2 June 5th 05 07:48 PM
Formula appears as text Tiles Excel Worksheet Functions 3 March 27th 05 10:48 AM


All times are GMT +1. The time now is 12:40 PM.

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"