+ Reply to Thread
Results 1 to 6 of 6

Counting adjacent cells(text) to equal one value

  1. #1
    Registered User
    Join Date
    12-28-2012
    Location
    CA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Counting adjacent cells(text) to equal one value

    Hi All,

    I'm looking for a formula that counts adjacent cells (texts) as one number

    If cell D8 has the word "Present" and E8 has the words "Night Shift", this combined equals 1.
    Attached Files Attached Files
    Last edited by Calithea; 12-28-2012 at 07:53 PM. Reason: Add Attachment

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Counting adjacent cells(text) to equal one value

    Calithea, welcome to the forum

    I think you need to explain your requirement in a bit more details.
    i would suggest you upload a sample work book, (all sensitive data removed), showing what data you are working with, a few examples of what your expected outcome is, and how you arrived at that
    To attach a file to your post,
    click advanced (next to quick post),
    scroll down until you see "manage file",
    click that and select "add files" (top right corner).
    click "select files" find your file, click "open" click "upload" click 'done" bottom right. click "submit reply"

    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.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert
    Join Date
    12-24-2004
    Location
    Sweden
    Posts
    1,256

    Re: Counting adjacent cells(text) to equal one value

    Try and put in cell E2: =(Table1[[#This Row],[Status]]="Present")*(Table1[[#This Row],[Shift]]="Day")
    //Ola
    Mark the problem as Solved under the Yellow bar up Top right, under Thread Tools, when you received a solution.
    It saves time, to skip already solved threads.

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Counting adjacent cells(text) to equal one value

    Assuming you want to count the occurances of those 2 events, use this...

    =COUNTIFS($C$2:$C$200,"present",$D$2:$D$200,"Day")

    I dont know how long your table is, so you will need to adjust the ranges as needed

  5. #5
    Registered User
    Join Date
    12-26-2012
    Location
    Meerut
    MS-Off Ver
    Excel 2007
    Posts
    86

    Re: Counting adjacent cells(text) to equal one value

    i think u want this

    =IF(AND(C11="present",D11="Day"),1)?

  6. #6
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: Counting adjacent cells(text) to equal one value

    Hi I am not sure if its what you get
    =IF(AND(E8="Present",OR(F8="Day",F8="Night",F8="Shift")),1,0)

    Formula gives 1 if the F8 cell is one of the those three words "Night, Shift, Day"
    Attached Files Attached Files

+ 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