+ Reply to Thread
Results 1 to 11 of 11

How to make Excel count specific letters as "1" and then have them summed up?

  1. #1
    Registered User
    Join Date
    01-20-2012
    Location
    Vasteras, Sweden
    MS-Off Ver
    Excel 1997
    Posts
    5

    How to make Excel count specific letters as "1" and then have them summed up?

    Hi there!

    I work as a vacation planner and I've made an Excel sheet for the upcoming summer!

    At my work only 33% of the staff are allowed to have vacation at the same time...
    ...unless the employees have kids and applies for "Parental vacation" (wich is regulated by governmental law) wich is counted beside the 33%...

    My problem/question is as follows:

    Is it possible to see "F" as "1" and then have all the "F:s" in a column summed up? Is it also possible to have some "S" in the same column and also see them as "1" as well but summing them up separately?

    In my problem/question "F" stands for "Parental vacation" and "S" for "plain vacation"!

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,608

    Re: How to make Excel count specific letters as "1" and then have them summed up?

    Hi
    you may use something like =COUNTIF(your_range,"f")

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,167

    Re: How to make Excel count specific letters as "1" and then have them summed up?

    You could use COUNTIF


    =COUNTIF(A:A,"F")


    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Registered User
    Join Date
    01-20-2012
    Location
    Vasteras, Sweden
    MS-Off Ver
    Excel 1997
    Posts
    5

    Re: How to make Excel count specific letters as "1" and then have them summed up?

    Thank you!

    I will try and get back to you with a big thanks or additional questions!

    Best regards

    Fredrik

  5. #5
    Registered User
    Join Date
    01-20-2012
    Location
    Vasteras, Sweden
    MS-Off Ver
    Excel 1997
    Posts
    5

    Re: How to make Excel count specific letters as "1" and then have them summed up?

    I tried =COUNTIF(D7:D87,"F")

    But it says "wrong formula"...Excel denies the code...

    Have I done something wrong?

  6. #6
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: How to make Excel count specific letters as "1" and then have them summed up?

    Hi

    Try not with gomma!

    =COUNTIF(D7:D87;"F")

    And if you want "S" too, try this.

    =COUNTIF(D7:D87;"F")+=COUNTIF(D7:D87;"S")
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

  7. #7
    Forum Contributor
    Join Date
    12-28-2011
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    280

    Re: How to make Excel count specific letters as "1" and then have them summed up?

    Are you using a Swedish language version of Excel? I believe your formula name therefore is ANTAL.OM

    Since I can't test this I am unsure if this is true, but try:

    =ANTAL.OM(D7:D87,"F")

  8. #8
    Registered User
    Join Date
    01-20-2012
    Location
    Vasteras, Sweden
    MS-Off Ver
    Excel 1997
    Posts
    5

    Re: How to make Excel count specific letters as "1" and then have them summed up?

    Thanks for your help guys! You are awesome!

    I use a swedish version so the problem was initially the "countif" thing and the comma...

    With this formula:

    =ANTAL.OM(D7:D87;"F")

    I make Excel accept the code, but now Excel asks for wich cell in the column I want to count. I have placed four "F:s" in the column and was hoping to get a "4" in my "sum-cell"...but excel keeps asking wich "F" I want to count...I want to count the whole column...

  9. #9
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,167

    Re: How to make Excel count specific letters as "1" and then have them summed up?

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook. Don't upload a picture when you have a workbook question. None of us is inclined to recreate your data. Upload the workbook and manually add an 'after' situation so that we can see what you expect. In addition clearly explain how you get the results..
    To attach a file to your post, you need to be using the main 'New Post' or 'New Thread' page and not 'Quick Reply'.
    To use the main 'New Post' page, click the 'Post Reply' button in the relevant thread.

    On this page, below the message box, you will find a button labelled 'Manage Attachments'.
    Clicking this button will open a new window for uploading attachments.

    You can upload an attachment either from your computer or from another URL by using the appropriate box on this page.
    Alternatively you can click the Attachment Icon to open this page.

    To upload a file from your computer, click the 'Browse' button and locate the file.

    To upload a file from another URL, enter the full URL for the file in the second box on this page.
    Once you have completed one of the boxes, click 'Upload'.

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.

  10. #10
    Registered User
    Join Date
    01-20-2012
    Location
    Vasteras, Sweden
    MS-Off Ver
    Excel 1997
    Posts
    5

    Re: How to make Excel count specific letters as "1" and then have them summed up?

    Hey guys!

    I got it working! You are the best!

    Multiple thanks!!!

  11. #11
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    48,167

    Re: How to make Excel count specific letters as "1" and then have them summed up?

    You're welcome.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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