+ Reply to Thread
Results 1 to 9 of 9

Replace text with Num and do a Percentage?

Hybrid View

  1. #1
    Registered User
    Join Date
    11-16-2012
    Location
    adelaide
    MS-Off Ver
    Excel 07/10
    Posts
    56

    Replace text with Num and do a Percentage?

    Hi Guys,

    Hoping someone can help.
    I am trying to Replace Yes in a Column with Number 1 and No with Number 0 and Keep NA as a nil value.
    Once replace is done either in the original column or a new one, I want to be able to get a percentage of Yes vs No

    for eg: Column 1 had 2 Yes and 2 No so the % should be 50-50!

    Help!

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Replace text with Num and do a Percentage?

    Hi dkshodhi,

    Try using below formula:-

    Formula: copy to clipboard
    =COUNTIF($A$1:$A$6,"yes")/COUNTIF($A$1:$A$6,"<>NA")*100&"-"&COUNTIF($A$1:$A$6,"NO")/COUNTIF($A$1:$A$6,"<>NA")*100


    See attached : counting text and percentage.xlsx


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    11-16-2012
    Location
    adelaide
    MS-Off Ver
    Excel 07/10
    Posts
    56

    Re: Replace text with Num and do a Percentage?

    Hi Dilip,

    Thank you...this is what I am looking for however instead of getting the percentage split on just one column, I need it in two columns.

    I should have explained it better in my question.
    Like B1 says 50% based on all Yes values in A1
    and B2 says 50% based on all No values in A1

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Replace text with Num and do a Percentage?

    Okay.. no worries.

    If you see into that formula, there is a seperator (-) in between... so just use the left portion in B1 and right portion in B2 with *100

    after this,you might need to format the cell as percentage format... thanks


    Regards,
    DILIpandey

    <click on below 'star' if this helps>

  5. #5
    Registered User
    Join Date
    11-16-2012
    Location
    adelaide
    MS-Off Ver
    Excel 07/10
    Posts
    56

    Re: Replace text with Num and do a Percentage?

    Final question...

    Is there any way to tell excel to pick the cell by itself instead of defining it from row 1 to 6 etc?
    Like It reads everything in Column A...
    A:A kind of thing? as I may have data till 6 rows now but it may increase to 20 later?

  6. #6
    Registered User
    Join Date
    11-16-2012
    Location
    adelaide
    MS-Off Ver
    Excel 07/10
    Posts
    56

    Re: Replace text with Num and do a Percentage?

    Works Great!

    Thanks

  7. #7
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Replace text with Num and do a Percentage?

    Yes.. for this I would suggest you to look into defined names over internet.. let me know if you face any issue.

    Since this thread title is different, would prefer to take that question in another thread with suitable thread title..

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  8. #8
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Replace text with Num and do a Percentage?

    Yes.. for this I would suggest you to look into defined names over internet.. let me know if you face any issue.

    Since this thread title is different, would prefer to take that question in another thread with suitable thread title..

    Regards,
    DILIPandey

    <click on below 'star' if this helps>

  9. #9
    Registered User
    Join Date
    11-16-2012
    Location
    adelaide
    MS-Off Ver
    Excel 07/10
    Posts
    56

    Re: Replace text with Num and do a Percentage?

    Thanks..I will have a look Online.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1