# Counting adjacent cells(text) to equal one value

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.

2. ## 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.

3. ## 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

4. ## 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. ## Re: Counting adjacent cells(text) to equal one value

i think u want this

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

6. ## 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"

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

#### 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