+ Reply to Thread
Results 1 to 6 of 6

Count value in a row IF the adjacent row equals a certain value

  1. #1
    Registered User
    Join Date
    02-04-2019
    Location
    Devon,England
    MS-Off Ver
    Office 365
    Posts
    5

    Count value in a row IF the adjacent row equals a certain value

    Hello all,

    I am new to the forum and very much a novice with excel. The worksheet I am working with has three columns. A date, supplied from and received by.

    I am trying to work out how to extract how many times has each area supplied to each of the other areas. I have played around with Index and match but that does not seem to work as there maybe multiple hits. To add confusion I would like to be able to tell it to only supply data when the date is before or after certain date.

    I plan to have a drop down list with each of the locations. As per below - I would like to be able to select a town from the list and I would like it to tell me that Town has supplied Another once - but does not show The town supplying Another because it was prior to the 10th of the month.

    I hope that all makes sense.

    Can anyone point me in the right direction?
    Attached Files Attached Files
    Last edited by JerryA; 02-04-2019 at 05:32 PM.

  2. #2
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Count value in a row IF the adjacent row equals a certain value

    Are You able create and attached some sample data, please?
    Happy with my answer * Add Reputation.
    If You are happy with solution, please use Thread tools and mark thread as SOLVED.

  3. #3
    Registered User
    Join Date
    02-04-2019
    Location
    Devon,England
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Count value in a row IF the adjacent row equals a certain value

    Basic workbook attached to original post.
    Last edited by JerryA; 02-04-2019 at 05:26 PM.

  4. #4
    Forum Expert KOKOSEK's Avatar
    Join Date
    08-03-2018
    Location
    Pole in Yorkshire, UK
    MS-Off Ver
    365/2013
    Posts
    2,742

    Re: Count value in a row IF the adjacent row equals a certain value

    English is not my native language, so I am not sure that I understand you needs.

    You want to based of town choosen from drop down (as I understand towns from col C - receiving) shows town from col B - supply.
    But could you explain this condition related to date? If 'Poole' been choosen, what town you want to get and why? Hull (23/1) or London (11/1) or Hull (07/1)? Any relation to today's date?

  5. #5
    Registered User
    Join Date
    02-04-2019
    Location
    Devon,England
    MS-Off Ver
    Office 365
    Posts
    5

    Re: Count value in a row IF the adjacent row equals a certain value

    Ok. Column B is the town that has supplied. Column C is the town that has received. My report must be able to show how many times one town has supplied the others.

    For example London has supplied to Poole once and to Hull once.

    And Poole has received from Hull twice and from London once.

    The date is an issue because the sheet will have data on it for the whole month. However I would be interested in the data between say the 11th of last month and the 10th of this month. Anything after the 10th on this month will be counted in next months figures.
    Last edited by JerryA; 02-05-2019 at 04:04 AM.

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,556

    Re: Count value in a row IF the adjacent row equals a certain value

    Perhaps something like the attached will help.
    The start and end dates are placed in G1 and I1 respectively.
    The data is populated using: =COUNTIFS(A$2:A$8,">="&G$1,A$2:A$8,"<="&I$1,B$2:B$8,B2,C$2:C$8,C2)
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] If a cell in a column equals today's date return the value of another cell adjacent to it
    By DeanExcel in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-24-2021, 01:38 AM
  2. [SOLVED] Return 1 if sum of adjacent matching cells equals zero
    By marcojhb in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-23-2016, 09:33 AM
  3. Replies: 9
    Last Post: 09-30-2014, 09:10 AM
  4. [SOLVED] Countifs to count a row equals another row
    By ncurran217 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 03-13-2013, 12:06 PM
  5. [SOLVED] Count in a range, where identical adjacent cells count as one instance.
    By the-algebraist in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 02-05-2013, 11:18 AM
  6. Count if the value equals
    By akbar in forum Excel General
    Replies: 3
    Last Post: 02-27-2008, 11:12 PM
  7. [SOLVED] highlight cells equals sum, not count
    By PTFisher in forum Excel General
    Replies: 2
    Last Post: 06-04-2005, 03:05 PM

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